diff --git a/admin/inc/class.soaccounts.inc.php b/admin/inc/class.soaccounts.inc.php index 0f27e16b9a..c63fdad3d4 100755 --- a/admin/inc/class.soaccounts.inc.php +++ b/admin/inc/class.soaccounts.inc.php @@ -25,7 +25,7 @@ { $userData['account_email'] = $userData['email']; } - + if ($userData['mustchangepassword'] == 1) $userData['account_lastpwd_change']=0; if (!($userData['account_id'] = $GLOBALS['egw']->accounts->create($userData))) { return false; diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index 89de3a9b7d..d1abb98555 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -156,7 +156,6 @@ class accounts_sql //echo "

accounts_sql::save(".print_r($data,true).")

\n"; $to_write = $data; unset($to_write['account_passwd']); - // encrypt password if given or unset it if not if ($data['account_passwd']) { @@ -169,6 +168,7 @@ class accounts_sql $to_write['account_pwd'] = $data['account_passwd']; $to_write['account_lastpwd_change'] = time(); } + if ($data['mustchangepassword'] == 1) $to_write['account_lastpwd_change']=0; if (!(int)$data['account_id'] || !$this->id2name($data['account_id'])) { if ($to_write['account_id'] < 0) $to_write['account_id'] *= -1; @@ -176,7 +176,7 @@ class accounts_sql if (!isset($to_write['account_pwd'])) $to_write['account_pwd'] = ''; // is NOT NULL! if (!isset($to_write['account_status'])) $to_write['account_status'] = ''; // is NOT NULL! - // postgres requires the auto-id field to be unset! + // postgres requires the auto-id field to be unset! if (isset($to_write['account_id']) && !$to_write['account_id']) unset($to_write['account_id']); if (!in_array($to_write['account_type'],array('u','g')) ||