Fix test on user->id
This commit is contained in:
parent
d4af17c1ae
commit
09426bd81f
@ -835,6 +835,12 @@ class User extends CommonObject
|
||||
|
||||
dol_syslog(get_class($this)."::addrights $rid, $allmodule, $allperms, $entity, $notrigger for user id=".$this->id);
|
||||
|
||||
if (empty($this->id)) {
|
||||
$error++;
|
||||
$this->error = 'Try to call addrights on an object user with an empty id';
|
||||
return -1;
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
$whereforadd = '';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user