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

Fixes: #1922 Fixed user manager foreignKey handling

parent f6be8331
......@@ -1543,7 +1543,7 @@ class user extends plugin
function foreignKeyUpdate ($field, $oldvalue, $newvalue, $source)
{
if ($field == 'manager' && $source == 'dn') {
if ($field == 'manager') {
if ($this->manager == $oldvalue) {
$this->manager = $newvalue;
}
......@@ -1554,7 +1554,7 @@ class user extends plugin
function foreignKeyCheck ($field, $value, $source)
{
if ($field == 'manager' && $source == 'dn') {
if ($field == 'manager') {
return ($this->manager == $value);
} else {
return parent::foreignKeyCheck($field, $value, $source);
......
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