EyeAmN8
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to get the role label from wp_user_rolesIt 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
Forum: Fixing WordPress
In reply to: How to get the role label from wp_user_rolesI 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; }Forum: Plugins
In reply to: [User Hierarchy] Post install – site isn't working very wellSo 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