Bug: user can change his own access levels
-
I created some unsynchronized access levels. When I logged in with a very low access privilege, I noticed the the Access section was available in the “Your profile” page and I was able to grant myself access to pages I should not be allowed to view.
Adding a condition in the Constructor should work, like
if (current_user_can( create_users )) { add_action( 'show_user_profile', array(&$this,'add_field_access_level')); add_action( 'edit_user_profile', array(&$this,'add_field_access_level')); };
Unfortunately, because of the loading order,
wp_get_current_user()
is not defined when the function is called, so a little more work is needed.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug: user can change his own access levels’ is closed to new replies.