Fix: If user has no perm to see other user, see himself.
This commit is contained in:
parent
7bd46d8aee
commit
51b6be4a64
@ -363,7 +363,8 @@ class FormOther
|
||||
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login";
|
||||
$sql_usr.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql_usr.= " WHERE u.entity IN (0,".$conf->entity.")";
|
||||
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.rowid = ".$user->id;
|
||||
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.rowid = ".$user->id;
|
||||
if (! empty($user->societe_id)) $sql_usr.=" AND u.fk_societe = ".$user->societe_id;
|
||||
// Add existing sales representatives of thirdparty of external user
|
||||
if (empty($user->rights->user->user->lire) && $user->societe_id)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user