[wp-trac] [WordPress Trac] #62012: Remove obsolete conditional in wp-admin/user-new.php

WordPress Trac noreply at wordpress.org
Sun Sep 8 17:51:25 UTC 2024


#62012: Remove obsolete conditional in wp-admin/user-new.php
----------------------------+----------------------------------------
 Reporter:  SergeyBiryukov  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  6.7
Component:  Users           |    Version:  3.0
 Severity:  normal          |   Keywords:  needs-patch good-first-bug
  Focuses:  administration  |
----------------------------+----------------------------------------
 As a result of [https://mu.trac.wordpress.org/changeset/641 mu:641],
 [https://mu.trac.wordpress.org/changeset/1529 mu:1529], [12722], and
 [16294], there is a redundant condition in `wp-admin/user-new.php`:
 {{{
 $username = $user_details->user_login;
 ...
 if ( null != $username && ... ) {
 }}}

 The `null != $username` part was initially added for `$username =
 $wpdb->get_var()` in [https://mu.trac.wordpress.org/changeset/641 mu:641],
 but now that `$username` is set to `$user_details->user_login`, it will
 never be `null` in this specific line, so this part of the conditional can
 be removed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62012>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list