From 52933ba6c325032692a0d745ab61b2c2ddb95801 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 26 Jun 2013 10:48:37 +0000 Subject: [PATCH] fixed lost active account-status, if an error happend (disabled permanent error_log) --- admin/inc/class.boaccounts.inc.php | 4 ++-- admin/inc/class.uiaccounts.inc.php | 18 ++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/admin/inc/class.boaccounts.inc.php b/admin/inc/class.boaccounts.inc.php index 12ef790c96..a92fffebb2 100755 --- a/admin/inc/class.boaccounts.inc.php +++ b/admin/inc/class.boaccounts.inc.php @@ -372,7 +372,7 @@ */ function save_user(array &$_userData) { - error_log(__METHOD__."(".array2string($_userData).")"); + //error_log(__METHOD__."(".array2string($_userData).")"); $errors = array(); // do NOT save password via accounts::save, as pw policy violation can happen and we cant/dont report that way @@ -456,7 +456,7 @@ } $GLOBALS['egw']->session->delete_cache((int)$_userData['account_id']); - error_log(__METHOD__."(".array2string($_userData).") returning ".array2string($errors)); + //error_log(__METHOD__."(".array2string($_userData).") returning ".array2string($errors)); return $errors; } diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 7e2acf4550..de77caf945 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -888,17 +888,7 @@ settype($account_id,'integer'); $account_id = (int)($_GET['account_id'] ? $_GET['account_id'] : $accountid); - // todo - // not needed if i use the same file for new users too - /*if(!$account_id) - { - $this->list_users(); - return False; - } - else*/ - { - $this->create_edit_user($account_id); - } + $this->create_edit_user($account_id); } } @@ -962,7 +952,7 @@ $var['mustchangepassword']= (isset($userData['account_lastpwd_change']) && ((is_string($userData['account_lastpwd_change']) && $userData['account_lastpwd_change']==="0")||(is_int($userData['account_lastpwd_change']) && $userData['account_lastpwd_change']===0)) ? '  X' : ' '); unset($acl); - if ($userData['status']) + if ($userData['account_status']) { $var['account_status'] = lang('Enabled'); } @@ -1335,7 +1325,7 @@ else { $userData = Array(); - $userData['status'] = 'A'; + $userData['account_status'] = 'A'; $userGroups = Array(); $userData['anonymous'] = False; $userData['changepassword'] = (bool)$GLOBALS['egw_info']['server']['change_pwd_every_x_days']; @@ -1442,7 +1432,7 @@ 'anonymous' => '', 'changepassword' => '', 'mustchangepassword' => '', - 'account_status' => '', + 'account_status' => '', 'account_firstname' => '', 'account_lastname' => '', 'account_email' => '',