Fix user status
This commit is contained in:
parent
a0a6ab7241
commit
5978f40461
@ -1314,7 +1314,7 @@ if (!empty($arrayfields['s.tms']['checked'])) {
|
||||
// Status
|
||||
if (!empty($arrayfields['s.status']['checked'])) {
|
||||
print '<td class="liste_titre center minwidth75imp">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status minwidth75 maxwidth125 onrightofpage', 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status minwidth75imp maxwidth125 onrightofpage', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['s.import_key']['checked'])) {
|
||||
|
||||
@ -436,7 +436,7 @@ class User extends CommonObject
|
||||
$sql .= " u.admin, u.login, u.note_private, u.note_public,";
|
||||
$sql .= " u.pass, u.pass_crypted, u.pass_temp, u.api_key,";
|
||||
$sql .= " u.fk_soc, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid, u.fk_user_expense_validator, u.fk_user_holiday_validator,";
|
||||
$sql .= " u.statut, u.lang, u.entity,";
|
||||
$sql .= " u.statut as status, u.lang, u.entity,";
|
||||
$sql .= " u.datec as datec,";
|
||||
$sql .= " u.tms as datem,";
|
||||
$sql .= " u.datelastlogin as datel,";
|
||||
@ -553,7 +553,10 @@ class User extends CommonObject
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note = $obj->note_private; // deprecated
|
||||
$this->statut = $obj->statut;
|
||||
|
||||
$this->statut = $obj->status; // deprecated
|
||||
$this->status = $obj->status;
|
||||
|
||||
$this->photo = $obj->photo;
|
||||
$this->openid = $obj->openid;
|
||||
$this->lang = $obj->lang;
|
||||
@ -1349,7 +1352,10 @@ class User extends CommonObject
|
||||
$error = 0;
|
||||
|
||||
// Check parameters
|
||||
if ($this->statut == $status) {
|
||||
if (isset($this->statut) && $this->statut == $status) {
|
||||
return 0;
|
||||
}
|
||||
if (isset($this->status) && $this->status == $status) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -800,7 +800,7 @@ if (!empty($arrayfields['u.tms']['checked'])) {
|
||||
if (!empty($arrayfields['u.statut']['checked'])) {
|
||||
// Status
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectarray('search_statut', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
|
||||
print $form->selectarray('search_statut', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'search_status minwidth75imp maxwidth125 onrightofpage');
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
|
||||
Loading…
Reference in New Issue
Block a user