Make WordPress Core

Changeset 62086


Ignore:
Timestamp:
03/20/2026 10:35:32 PM (7 days ago)
Author:
SergeyBiryukov
Message:

Code Quality: Simplify user permission check for importing new users.

This removes a redundant conditional in the check_import_new_users() function, simplifying its logic to directly return the result of the permission check.

Follow-up to mu:1829, [39945].

Props Soean.
See #64238.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ms.php

    r61878 r62086  
    615615 */
    616616function check_import_new_users( $permission ) {
    617     if ( ! current_user_can( 'manage_network_users' ) ) {
    618         return false;
    619     }
    620 
    621     return true;
     617    return current_user_can( 'manage_network_users' );
    622618}
    623619// See "import_allow_fetch_attachments" and "import_attachment_size_limit" filters too.
Note: See TracChangeset for help on using the changeset viewer.