Fix test on user->id

This commit is contained in:
Laurent Destailleur 2023-04-13 18:30:06 +02:00
parent d4af17c1ae
commit 09426bd81f

View File

@ -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 = '';