summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-13 11:10:44 (GMT)
committerRenato Botelho <garga@FreeBSD.org>2014-11-13 11:10:44 (GMT)
commit340ce958d9930a678d60292388636420030ad77c (patch)
treeef112e8d51c2cab53f80a2b4d2b13582d2cff7c3
parentbd0bb466f073c50a443c09096e89acf0abf8fdaa (diff)
downloadunivnautes-340ce958d9930a678d60292388636420030ad77c.zip
univnautes-340ce958d9930a678d60292388636420030ad77c.tar.gz
univnautes-340ce958d9930a678d60292388636420030ad77c.tar.bz2
Add an extra protection to avoid having an empty group created
-rw-r--r--etc/inc/auth.inc2
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'];