Current time: 05-24-2012, 06:59 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [Mod CP] impossible to edit admin profiles
08-21-2008, 11:12 PM
Post: #1
[F] [Mod CP] impossible to edit admin profiles
The (do_)editprofile actions in modcp.php use this buggy code with a confusing comment... O.o

PHP Code:
// Current user is a super mod or is an administrator and the user we are editing is a super admin, cannot edit admins
else if($mybb->usergroup['issupermod'] == && $user_permissions['cancp'] == || (is_super_admin($user['uid']) && !is_super_admin($user['uid']))) 

Shouldn't the modcp_can_manage_user() function be used instead?

Part 2 of the problem: even after changing the code to use that function, it's still impossible to edit admin profiles. Even when logged in as a super admin, you can't edit your own profile or the profile of any other admin.

I think this will fix it... in /inc/functions_modcp.php find:

PHP Code:
else if($mybb->usergroup['issupermod'] == && $user_permissions['cancp'] == || (is_super_admin($uid) && !is_super_admin($mybb->user['uid']))) 

Replace with:

PHP Code:
if($user_permissions['cancp'] == && ($mybb->usergroup['cancp'] != || (is_super_admin($uid) && !is_super_admin($mybb->user['uid'])))) 
Visit this user's website Find all posts by this user
08-22-2008, 01:44 AM
Post: #2
[F] [Mod CP] impossible to edit admin profiles
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 2 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication