Skip to content
Snippets Groups Projects
Commit e6194774 authored by David Surville's avatar David Surville
Browse files

Modification des paramètres de la fonction de création d'un compte Zimbra

parent 9ed7ccfd
Branches
Tags 3.0.1
No related merge requests found
......@@ -183,14 +183,12 @@ class ZimbraAccountService extends AbstractService
* Créé un nouveau compte
*
* @param string|AccountEntity $value nom du compte ou objet AccountEntity
* @param string $password
* @param array $attrs
* @return AccountEntity
* @throws \UnicaenZimbra\Exception
*/
public function create($value, string $password): AccountEntity
public function create($value, array $attrs = []): AccountEntity
{
$attrs = array();
if ($value instanceof AccountEntity) {
$attrs['name'] = $value->getName();
$params = $value->getConvertedChanges();
......@@ -203,8 +201,6 @@ class ZimbraAccountService extends AbstractService
$account = new AccountEntity;
}
$attrs['password'] = $password;
$response = $this->getZimbra()->request('CreateAccountRequest', $attrs, $params);
$accounts = $response->children()->CreateAccountResponse->children();
$account->populate($accounts[0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment