MyBB Community Forums

Full Version: [F] Usergroup permissions: Attachments and PMs [C-Chris]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If a user is member of more than one usergroup he has unlimited attachment space and an unlimited number of PMs.

Steps to reproduce:
1. Set the permissions of the primary usergroup of a user to: Attachment space 2000KB/PM quota 200
2. Create a new usergroup with these permissions: Attachment space 500KB/PM quota 50
3. Set the new group as the secondary group of the user. Now he has now limitations anymore.
Perhaps one of these groups had a value of 0 for one of these settings?
No. The testuser on my local installation is member of the groups with the ids 2 (primary) and 8 (secondary).

This is a part of the content of the usergroups cache:
Array
(
    [2] => Array
        (
            [gid] => 2
            [pmquota] => 200
            [attachquota] => 2000
        )

    [8] => Array
        (
            [gid] => 8
            [pmquota] => 50
            [attachquota] => 500
        )

)
This is a part of the output of $mybb->usergroup:
Array
(
    [pmquota] => 0
    [attachquota] => 0
)
To fix, in inc/functions.php, find:
$usergroup[$perm] == 0
Replace with
$permbit === 0
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.

With regards,
MyBB Group
is it updated now?
No, it won't be available until 1.4.5, same as pretty much every other bug fix.