Skip to content
Snippets Groups Projects
Commit 95e44749 authored by Florian Henry's avatar Florian Henry
Browse files

Fix bug on PgSQL if user in on another entity than 1

parent a35a44b2
No related branches found
No related tags found
No related merge requests found
......@@ -906,7 +906,9 @@ abstract class DolibarrModules
dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid);
$tmpuser=new User($this->db);
$tmpuser->fetch($obj2->rowid);
$tmpuser->addrights($r_id);
if (!empty($tmpuser->id)) {
$tmpuser->addrights($r_id);
}
$i++;
}
if (! empty($user->admin)) // Reload permission for current user if defined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment