summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-09-28 11:12:37 -0400
committerjim-p <jimp@pfsense.org>2010-09-28 11:13:16 -0400
commit25fec9b35a8e5c84778358100ca326b72ac3eec5 (patch)
treeeb4d20aa86ee878963b654521300874083332468 /etc/inc/auth.inc
parent7eab33095e8f2293a43ec03c7c6bf002c084bdb2 (diff)
downloadpfsense-25fec9b35a8e5c84778358100ca326b72ac3eec5.zip
pfsense-25fec9b35a8e5c84778358100ca326b72ac3eec5.tar.gz
Test before working on what could be an empty value, otherwise it ends up set and causing an unexpected duplication. Fixes duplicate groups when editing users, as reported here: http://forum.pfsense.org/index.php/topic,26612.0.html
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index f5c84d8..ac1e4ec 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -454,6 +454,8 @@ function local_user_set_groups($user, $new_groups = NULL ) {
foreach ($cur_groups as $groupname) {
if (in_array($groupname,$new_groups))
continue;
+ if (!isset($config['system']['group'][$groupindex[$groupname]]))
+ continue;
$group = & $config['system']['group'][$groupindex[$groupname]];
if (is_array($group['member'])) {
$index = array_search($user['uid'], $group['member']);
OpenPOWER on IntegriCloud