Hi,
I'm trying to figure out a way to test for the current user's role or level on the current blog.
I'm working out an admin redirect for subscribers and unless the subscriber has a role on the current blog, the redirect fails.
Here is my code
function redirect_subscribers() {
global $user_level
if ($user_level == '0' ) {
wp_redirect('http://www.mysite.org/wpmu/blog1');
}
}
add_action('admin_menu', 'redirect_subscribers');
What happens is subscriber A indeed has a user level of 0 and is associated with the current blog (shows up in current blog's list of users) is redirected as desired.
Subscriber B also has a user level of 0 but is not associated with the current blog and is redirected to wp-admin of the main blog.
I know why this happens and understand the functionality but I need help in creating more specific conditionals to get around it. The end goal here is really just to keep any Subscribers from the wp-admin area.
Thanks for any thoughts or suggestions