capabilities edit_users vs edit_user
-
I see line 1268 of this extension
$user_caps['switch_to_user'] = ( user_can( $user->ID, 'edit_user', $args[2] ) && ( $args[2] !== $user->ID ) );
I dont know why but for a specific role is work for generate the link to switch but not to really switch
current_user_can( ‘switch_to_user’, $user_id ) is true in users list page but false when action=switch_to_user.
I think the test user_can have to look to capabilitie ‘edit_users’ and not ‘edit_user’.
If i change that it’s work.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.