php - Wordpress Users not Listing


For some reason, I cant seem to get any users from the following code... Is there anything wrong with it? All I get is "FUBAR"...

function current_user_access_level($type, $object) {
    if ( $type == 'users' ) {
        if ( empty( $object) ) {
            $return = 'FUBAR';
        } else {
            $current_user = wp_get_current_user();
            $user_id = $current_user->ID;
            $user_access_level = get_user_meta($user_id, 'wpcf-member-access-level', true);
            switch ($user_access_level) {
                case 1:
                    $return = '1'; 
                case 2;
                    $return = '2'; 
                case 3;
                    $return = '3'; 
                case 4;
                    $return = '4'; 
    return $return;

People are also looking for solutions to the problem: php - Javascript: why is my instant search function running lagging, how to improve?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.