forked from extern/egroupware
allow for forced passwordchange on next login at account creation time
This commit is contained in:
parent
40d786871e
commit
61812f4dc5
@ -25,7 +25,7 @@
|
|||||||
{
|
{
|
||||||
$userData['account_email'] = $userData['email'];
|
$userData['account_email'] = $userData['email'];
|
||||||
}
|
}
|
||||||
|
if ($userData['mustchangepassword'] == 1) $userData['account_lastpwd_change']=0;
|
||||||
if (!($userData['account_id'] = $GLOBALS['egw']->accounts->create($userData)))
|
if (!($userData['account_id'] = $GLOBALS['egw']->accounts->create($userData)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -156,7 +156,6 @@ class accounts_sql
|
|||||||
//echo "<p>accounts_sql::save(".print_r($data,true).")</p>\n";
|
//echo "<p>accounts_sql::save(".print_r($data,true).")</p>\n";
|
||||||
$to_write = $data;
|
$to_write = $data;
|
||||||
unset($to_write['account_passwd']);
|
unset($to_write['account_passwd']);
|
||||||
|
|
||||||
// encrypt password if given or unset it if not
|
// encrypt password if given or unset it if not
|
||||||
if ($data['account_passwd'])
|
if ($data['account_passwd'])
|
||||||
{
|
{
|
||||||
@ -169,6 +168,7 @@ class accounts_sql
|
|||||||
$to_write['account_pwd'] = $data['account_passwd'];
|
$to_write['account_pwd'] = $data['account_passwd'];
|
||||||
$to_write['account_lastpwd_change'] = time();
|
$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 (!(int)$data['account_id'] || !$this->id2name($data['account_id']))
|
||||||
{
|
{
|
||||||
if ($to_write['account_id'] < 0) $to_write['account_id'] *= -1;
|
if ($to_write['account_id'] < 0) $to_write['account_id'] *= -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user