Author Topic: [1.7 / 1.7.1] Changes in user permissions might update a usergroup the user in  (Read 21519 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
This bug accur only when a member was added into a usergroup and then admin update/change that member's permissions, in some cases it will update/change the usergroup permissions as well.
To test it do the following:
1) register a new account on register.php page (not in ACP!)
2) in ACP set any permission in one category to "Private"
3) create a new usergroup "test"
4) in ACP find the new user account and add it to "test" usergroup
5) edit permissions for the user, and change any of the available permissions.
6) edit usergroup "test", the changes saved from user's permissions (step 5) affected the permissions of this usergroup.

To fix that do the following:

In admin/usergroups.php find:
Code: [Select]
            WHERE gm.user_id = $user_id AND g.group_id = gm.group_id";Replace with:
Code: [Select]
            WHERE gm.user_id = $user_id AND g.group_id = gm.group_id AND g.group_type = ".GROUPTYPE_SINGLE;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline 8o8o8.com

  • Newbie
  • *
  • Posts: 10
    • View Profile
thankx