Fix link on user
This commit is contained in:
parent
8c73ef4bbf
commit
f8e6befe35
@ -302,7 +302,7 @@ $sql .= " p.rowid as project_id, p.ref as project_ref,";
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||
$sql .= " sc.fk_soc, sc.fk_user,";
|
||||
}
|
||||
$sql .= " u.firstname, u.lastname, u.photo, u.login";
|
||||
$sql .= " u.firstname, u.lastname, u.photo, u.login, u.statut as status, u.admin, u.employee, u.email as uemail";
|
||||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
@ -1092,12 +1092,20 @@ if ($resql) {
|
||||
|
||||
$userstatic->id = $obj->fk_user_author;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->status = $obj->status;
|
||||
$userstatic->lastname = $obj->name;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->admin = $obj->admin;
|
||||
$userstatic->ref = $obj->fk_user_author;
|
||||
$userstatic->employee = $obj->employee;
|
||||
$userstatic->email = $obj->uemail;
|
||||
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if ($userstatic->id) {
|
||||
print $userstatic->getLoginUrl(1);
|
||||
if ($userstatic->id > 0) {
|
||||
print $userstatic->getNomUrl(-1, '', 0, 0, 24, 1, 'login', '', 1);
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
|
||||
@ -2797,7 +2797,7 @@ class User extends CommonObject
|
||||
*/
|
||||
public function getLibStatut($mode = 0)
|
||||
{
|
||||
return $this->LibStatut($this->statut, $mode);
|
||||
return $this->LibStatut(isset($this->statut) ? $this->statut : $this->status, $mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user