Bug #968
closedPHP error in user manager
100%
Description
Fresh install of built on Fri Oct 22 06:39:04 UTC 2010
A PHP error shows in the "select group membership" fields when creating a new user. Editing the user afterwards correctly shows the default admin group and assigning the user to it also works.
Updated by Peter O almost 15 years ago
I can see 2 admin groups in my group list, probably has something to do with it. Having the same problem on 2 freshly installed firewalls.
Updated by Peter O almost 15 years ago
The 2 admin groups problem seems to have been fixed but the PHP error is still there. This should be an easy ticket to close, only have to change 2 lines in system_usermanager.php:
Line 527 from:
if (in_array($group['name'],$pconfig['groups']))
to
if (is_array($pconfig['groups']) && in_array($group['name'],$pconfig['groups']))
Line 555 from:
if (!in_array($group['name'],$pconfig['groups']))
to
if (!is_array($pconfig['groups']) || !in_array($group['name'],$pconfig['groups']))
Updated by Jim Pingle almost 15 years ago
The logic in that second suggested fix isn't quite right. It would skip all groups if the user didn't have any groups assigned, but in an inefficient way. Better to test if the user has no groups before bothering to foreach. Faster that way.
Updated by Jim Pingle almost 15 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 08724afa0a323fe5ec04805befbf36b19a67dbed.
Updated by Jim Pingle over 14 years ago
- Status changed from Feedback to Resolved