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

Fixes #3554 fixed posixAccount reaction to gidNumber change

parent 746c12ae
......@@ -628,6 +628,19 @@ class posixAccount extends simplePlugin
$this->accessTo = $tmp;
}
}
function foreignKeyUpdate ($field, $oldvalue, $newvalue, $source)
{
$ret = parent::foreignKeyUpdate($field, $oldvalue, $newvalue, $source);
if ($field == 'gidNumber') {
if ($newvalue === NULL) {
$this->primaryGroup = 0;
} else {
$this->primaryGroup = $this->gidNumber;
}
}
return $ret;
}
}
?>
Supports Markdown
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