Fix: Melange entre user affiché et user qui consulte
This commit is contained in:
parent
4b2ac9b609
commit
c61236d1a9
@ -36,6 +36,10 @@ $user->getrights('user');
|
|||||||
// Sécurité accés client et commerciaux
|
// Sécurité accés client et commerciaux
|
||||||
$id = isset($_GET["id"])?$_GET["id"]:'';
|
$id = isset($_GET["id"])?$_GET["id"]:'';
|
||||||
|
|
||||||
|
$fuser = new User($db);
|
||||||
|
$fuser->id = $id;
|
||||||
|
$fuser->fetch();
|
||||||
|
|
||||||
// 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 (($fuser->id != $user->id) && (! $user->rights->user->user->lire))
|
if (($fuser->id != $user->id) && (! $user->rights->user->user->lire))
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -49,18 +53,15 @@ if (($fuser->id != $user->id) && (! $user->rights->user->user->lire))
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$user = new User($db);
|
$fuser->info($_GET["id"]);
|
||||||
$user->id=$_GET["id"];
|
|
||||||
$user->fetch();
|
|
||||||
$user->info($_GET["id"]);
|
|
||||||
|
|
||||||
$head = user_prepare_head($user);
|
$head = user_prepare_head($fuser);
|
||||||
|
|
||||||
dolibarr_fiche_head($head, 'info', $langs->trans("User"));
|
dolibarr_fiche_head($head, 'info', $langs->trans("User"));
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dolibarr_print_object_info($user);
|
dolibarr_print_object_info($fuser);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user