Skip to content

Commit

Permalink
[pfsense_user] Need to declare $groupindex as global - fixes setting …
Browse files Browse the repository at this point in the history
…system group membership #70
  • Loading branch information
opoplawski committed Dec 18, 2023
1 parent 322b53d commit 1334ca5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/pfsense_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 1334ca5

Please sign in to comment.