Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter EyeAmN8

    (@eyeamn8)

    It works, now I need to figure out how to only pull the needed data from the db instead of pulling all of it and picking out what I need. Other than that its good

    Thread Starter EyeAmN8

    (@eyeamn8)

    I figured it out! And the way to get the data is much cleaner with wordpress native functions.

    function dirty_get_role(){
    	global $wp_roles, $current_user;
    	$user_role = "";
    	if (is_user_logged_in()){
    		$user_roles = $current_user->roles;
    		$user_role = array_shift($user_roles);
    	}
    	$val = get_option( 'wp_user_roles' );
    	$label = $val[$user_role]['name'];
    	return $label;
    }
    Thread Starter EyeAmN8

    (@eyeamn8)

    So I looked into this a bit more and noticed that in phpMyAdmin a process was showing as locked multiple times: `
    SELECT DISTINCT
    SQL_CALC_FOUND_ROWS wp_users.ID
    FROM wp_users
    INNER JOIN wp_usermeta ON ( wp_users.ID`

    I found that it was coming from roles.php starting at line 197. I commented it out and the plugin seems to be working just fine.

    Going through the code it looks like it only has to do with blog posts which I’m not concerned with, but I may be wrong.

    I consider myself to be a pretty good php programmer, but not that familiar with wordpress and it’s api.

    Can you please confirm that this will not affect the plugin’s use, or possibly update the plugin to fix this matter.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)