diff options
author | Ermal <eri@pfsense.org> | 2014-11-11 21:35:29 +0100 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-11-11 21:35:29 +0100 |
commit | baca968c298f978321796836e9ef8a2a76f579ab (patch) | |
tree | 3d1dc1b7a03586ab07280c40775bbd298d0430ca | |
parent | e16f6d03a790e0f8b4f8abaf770ae00c32381b57 (diff) | |
download | pfsense-baca968c298f978321796836e9ef8a2a76f579ab.zip pfsense-baca968c298f978321796836e9ef8a2a76f579ab.tar.gz |
Do not do operations for empty group members
-rw-r--r-- | etc/inc/auth.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 0fe9d20..81a54bd 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -623,10 +623,13 @@ function local_group_set($group, $reset = false) { $group_name = $group['name']; $group_gid = $group['gid']; - $group_members = "''"; + $group_members = ''; if (!$reset && !empty($group['member']) && count($group['member']) > 0) $group_members = implode(",",$group['member']); + if (empty($group_members)) + return; + /* read from group db */ $fd = popen("/usr/sbin/pw groupshow {$group_name} 2>&1", "r"); $pwread = fgets($fd); |