Fix link to user
This commit is contained in:
parent
1636d341c7
commit
d58bb5f66b
@ -1580,7 +1580,13 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// User
|
// User
|
||||||
print '<td class="right"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$objp->login.'</a></td>';
|
print '<td class="right">';
|
||||||
|
if ($objp->user_id > 0) {
|
||||||
|
$userstatic = new User($db);
|
||||||
|
$userstatic->fetch($objp->user_id);
|
||||||
|
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
// Action
|
// Action
|
||||||
if ($user->rights->produit->supprimer)
|
if ($user->rights->produit->supprimer)
|
||||||
@ -1944,7 +1950,8 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
|||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$userstatic->fetch($line->fk_user);
|
$userstatic->fetch($line->fk_user);
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $userstatic->getLoginUrl(1);
|
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
|
||||||
|
//print $userstatic->getLoginUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -2153,7 +2160,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
|||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$userstatic->fetch($line->fk_user);
|
$userstatic->fetch($line->fk_user);
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $userstatic->getLoginUrl(1);
|
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Todo Edit or delete button
|
// Todo Edit or delete button
|
||||||
|
|||||||
@ -2461,8 +2461,8 @@ class User extends CommonObject
|
|||||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
|
$linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
//Check user's rights to see an other user
|
//Check user's rights to see an other user
|
||||||
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';
|
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';
|
||||||
|
|
||||||
if ($option == 'xxx')
|
if ($option == 'xxx')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user