Project

General

Profile

Actions

Bug #968

closed

PHP error in user manager

Added by Peter O almost 15 years ago. Updated over 14 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
User Manager / Privileges
Target version:
-
Start date:
10/22/2010
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

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.

Actions #1

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.

Actions #2

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']))

Actions #3

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.

Actions #4

Updated by Jim Pingle almost 15 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Peter O over 14 years ago

Seems to be fixed with that.

Actions #6

Updated by Jim Pingle over 14 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF