[wp-hackers] User role no access to wp-admin

scribu scribu at gmail.com
Tue Jun 8 12:29:25 UTC 2010


Erm... create a role with no capabilities? On a more serious note, the roles
system doesn't have an 'access_admin' capability.

You will need to set up a redirection:

function no_admin_access() {
  if ( is_admin() && current_user_can( 'a_role' ) )
    wp_redirect( get_bloginfo('url') );
}
add_action('init', 'no_admin_access');


-- 
http://scribu.net


More information about the wp-hackers mailing list