diff --git a/src/UnicaenZimbra/Service/ZimbraAccountService.php b/src/UnicaenZimbra/Service/ZimbraAccountService.php index 3b259f33f95acc8682ef6c8b98ad7c21e54461ac..708b9c3638518792ef29fa39c2bb208d1ace8dfd 100644 --- a/src/UnicaenZimbra/Service/ZimbraAccountService.php +++ b/src/UnicaenZimbra/Service/ZimbraAccountService.php @@ -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]);