diff --git a/plugins/modules/pfsense_user.py b/plugins/modules/pfsense_user.py index f6d02832..6ca12837 100644 --- a/plugins/modules/pfsense_user.py +++ b/plugins/modules/pfsense_user.py @@ -108,6 +108,7 @@ $a_user = &$config['system']['user']; $userent = $a_user[{idx}]; local_user_set($userent); +global $groupindex; foreach ({mod_groups} as $groupname) {{ $group = &$config['system']['group'][$groupindex[$groupname]]; local_group_set($group); @@ -121,6 +122,7 @@ USER_PHP_COMMAND_DEL = USER_PHP_COMMAND_PREFIX + """ $userent['name'] = '{name}'; $userent['uid'] = {uid}; +global $groupindex; foreach ({mod_groups} as $groupname) {{ $group = &$config['system']['group'][$groupindex[$groupname]]; local_group_set($group);