diff --git a/src/UnicaenZimbra/Service/ZimbraAccountService.php b/src/UnicaenZimbra/Service/ZimbraAccountService.php index 708b9c3638518792ef29fa39c2bb208d1ace8dfd..40197fe724a2bbd788a4f88666f5de4e4e4da366 100644 --- a/src/UnicaenZimbra/Service/ZimbraAccountService.php +++ b/src/UnicaenZimbra/Service/ZimbraAccountService.php @@ -183,11 +183,11 @@ class ZimbraAccountService extends AbstractService * Créé un nouveau compte * * @param string|AccountEntity $value nom du compte ou objet AccountEntity - * @param array $attrs + * @param array $params * @return AccountEntity * @throws \UnicaenZimbra\Exception */ - public function create($value, array $attrs = []): AccountEntity + public function create($value, array $params = []): AccountEntity { if ($value instanceof AccountEntity) { $attrs['name'] = $value->getName(); @@ -197,7 +197,8 @@ class ZimbraAccountService extends AbstractService $account = $value; } elseif (is_string($value)) { $attrs['name'] = $value; - $params = array(); + if (isset($params['name'])) unset($params['name']); + $params = $this->getZimbra()->makeZimbraAttributes($params); $account = new AccountEntity; }