- using new accounts::save instead accounts::create

- not setting change password acl for groups
This commit is contained in:
Ralf Becker 2006-06-08 21:11:07 +00:00
parent f397d26d2e
commit 6b2d5676f9

View File

@ -908,7 +908,7 @@
if(!($accountid = $GLOBALS['egw']->accounts->name2id($username))) if(!($accountid = $GLOBALS['egw']->accounts->name2id($username)))
{ {
if (!($accountid = $GLOBALS['egw']->accounts->create(array( $account = array(
'account_type' => $group ? 'u' : 'g', 'account_type' => $group ? 'u' : 'g',
'account_lid' => $username, 'account_lid' => $username,
'account_passwd' => $passwd, 'account_passwd' => $passwd,
@ -918,7 +918,8 @@
'account_primary_group' => $groupid, 'account_primary_group' => $groupid,
'account_expires' => -1, 'account_expires' => -1,
'account_email' => $email, 'account_email' => $email,
)))) );
if (!($accountid = $GLOBALS['egw']->accounts->save($account)))
{ {
return false; return false;
} }
@ -934,7 +935,7 @@
$GLOBALS['egw']->accounts->set_memberships($memberships,$accountid); $GLOBALS['egw']->accounts->set_memberships($memberships,$accountid);
} }
$this->add_acl('preferences','changepassword',$accountid,(int)$changepw); if (!$group) $this->add_acl('preferences','changepassword',$accountid,(int)$changepw);
return $accountid; return $accountid;
} }