diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-11-13 09:10:44 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-11-13 09:10:44 -0200 |
commit | 340ce958d9930a678d60292388636420030ad77c (patch) | |
tree | ef112e8d51c2cab53f80a2b4d2b13582d2cff7c3 /etc | |
parent | bd0bb466f073c50a443c09096e89acf0abf8fdaa (diff) | |
download | pfsense-340ce958d9930a678d60292388636420030ad77c.zip pfsense-340ce958d9930a678d60292388636420030ad77c.tar.gz |
Add an extra protection to avoid having an empty group created
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/auth.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 914b18f..8baf89c 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -574,7 +574,7 @@ function local_user_set_groups($user, $new_groups = NULL ) { /* determine which memberships to add */ foreach ($new_groups as $groupname) { - if (in_array($groupname,$cur_groups)) + if ($groupname == '' || in_array($groupname,$cur_groups)) continue; $group = & $config['system']['group'][$groupindex[$groupname]]; $group['member'][] = $user['uid']; |