Skip to:
Content
Pages
Categories
Search
Top
Bottom

The way to display how many members registered today?

  • @4ella

    Participant

    Anybody here pls. Do you know the code to display today registered members count, something like:
    20 new members registered today

Viewing 2 replies - 1 through 2 (of 2 total)
  • @4ella

    Participant

    nobody can help?

    @4ella

    Participant

    http://wordpress.stackexchange.com helped me:

    function bp_registrations_today($activated = false) {
        global $wpdb;
    
        $query = "SELECT COUNT(ID) FROM {$wpdb->prefix}users WHERE DATE(user_registered) = CURDATE()";
    
        if ( $activated ) {
            $query .= " AND user_status = 0";
        }
    
        return $wpdb->get_var($query);
    }

    To get the number of users registered today, call the function as

    echo bp_registrations_today();

    To get the number of users registered today with activated accounts, call the function as

    echo bp_registrations_today(true);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The way to display how many members registered today?’ is closed to new replies.
Skip to toolbar