Support » Plugin: New User Approve » Hide specific user

  • Hey.
    I have been able to hide the webmaster username from the normal user list using something like this:

    add_action(‘pre_user_query’,’yoursite_pre_user_query’);
    function yoursite_pre_user_query($user_search) {
    $user = wp_get_current_user();
    if ($user->ID!=1) { // Is not administrator, remove administrator
    global $wpdb;
    $user_search->query_where = str_replace(‘WHERE 1=1’,
    “WHERE 1=1 AND {$wpdb->users}.ID<>1”,$user_search->query_where);
    }
    }

    — however, when I visit the New User Approve/Deny area, it is not effected by the code.
    I have tried adding that code to the user-list.php file, but it is causing errors.

    Any thoughts?
    Goal is to have just a specific user name not displayed in the list.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The New User Approve/Deny screen is not getting any new features at this time. In a future release (haven’t determined when) it may go away altogether.

    The regular user screen does everything the New User Approve/Deny screen plus a lot more. That is what I am currently supporting.

    Is there something you use that screen for that is absolutely necessary for your workflow?

    Thread Starter current creation

    (@current-creation)

    The user registration approval page allows viewing of all the users in one scrollable screen and easily sort with the tab to see Approved vs. Denied. Instead of having to sort through 25 pages of users. It really is a nice way to view it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide specific user’ is closed to new replies.