2
0
forked from Wavyzz/dolibarr

Merge pull request #6133 from defrance/patch-58

Bad number rights on User badge tabs
This commit is contained in:
Laurent Destailleur
2016-12-11 02:54:46 +01:00
committed by GitHub
3 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -35,6 +35,7 @@ $object = new User($db);
if ($id > 0 || ! empty($ref))
{
$result = $object->fetch($id, $ref);
$object->getrights();
}
// Security check

View File

@@ -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();