Commit 0ac270b2 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #4061 PHP error when I use a template to create a user

parent 060aaf35
......@@ -629,8 +629,12 @@ class posixAccount extends simplePlugin
parent::adapt_from_template($attrs, $skip);
$this->savedGroupMembership = $this->groupMembership;
unset($this->attrs['posixGroups']['count']);
$this->groupMembership = $this->attrs['posixGroups'];
if (isset($this->attrs['posixGroups'])) {
unset($this->attrs['posixGroups']['count']);
$this->groupMembership = $this->attrs['posixGroups'];
} else {
$this->groupMembership = array();
}
$this->attributesAccess['uidNumber']->setInitialValue('');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment