forked from Wavyzz/dolibarr
Merge pull request #6133 from defrance/patch-58
Bad number rights on User badge tabs
This commit is contained in:
@@ -87,7 +87,7 @@ $object = new User($db);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
$object->getrights();
|
||||
$entitytouseforuserdir = $object->entity;
|
||||
if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1;
|
||||
$upload_dir = $conf->user->multidir_output[$entitytouseforuserdir] . "/" . $object->id ;
|
||||
|
||||
@@ -35,6 +35,7 @@ $object = new User($db);
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
$object->getrights();
|
||||
}
|
||||
|
||||
// Security check
|
||||
|
||||
@@ -37,6 +37,7 @@ $langs->load("users");
|
||||
|
||||
$object = new User($db);
|
||||
$object->fetch($id);
|
||||
$object->getrights();
|
||||
|
||||
// If user is not user read and no permission to read other users, we stop
|
||||
if (($object->id != $user->id) && (! $user->rights->user->user->lire)) accessforbidden();
|
||||
|
||||
Reference in New Issue
Block a user