• Hi there.

    Is there a simple way to display the pending users number across the site?

    in the users.php page there is an pending section.
    How can i use that number somewhere else in my theme?

    in the count_users() function there is no pending in that array when checking it via var_dump(count_users()).

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • count_users() shows only how many users are in.

    I think you need to create a function where to ask if there is a pending users():

    just like this:

    function count_pending_user(){
     // Query where to search if there is a pending user
     // if $count > 0 then show the number of pending user
     // else $count = 0;
     // return $count
    }
    Moderator bcworkz

    (@bcworkz)

    The devil is in the details – What to query for pending users? There’s no “pending” field or status. Or is there? It appears a count query in usermeta where “default_password_nag” is 1 will work.

    That is for regular WP. It’s different for WPMU.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get Pending users number’ is closed to new replies.