Display count of new members registered today [closed]

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);