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