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

[Fix] Les paramètres n'étaient pas pris en compte lors de la création d'un compte

parent c486a26f
No related branches found
No related tags found
No related merge requests found
...@@ -183,11 +183,11 @@ class ZimbraAccountService extends AbstractService ...@@ -183,11 +183,11 @@ class ZimbraAccountService extends AbstractService
* Créé un nouveau compte * Créé un nouveau compte
* *
* @param string|AccountEntity $value nom du compte ou objet AccountEntity * @param string|AccountEntity $value nom du compte ou objet AccountEntity
* @param array $attrs * @param array $params
* @return AccountEntity * @return AccountEntity
* @throws \UnicaenZimbra\Exception * @throws \UnicaenZimbra\Exception
*/ */
public function create($value, array $attrs = []): AccountEntity public function create($value, array $params = []): AccountEntity
{ {
if ($value instanceof AccountEntity) { if ($value instanceof AccountEntity) {
$attrs['name'] = $value->getName(); $attrs['name'] = $value->getName();
...@@ -197,7 +197,8 @@ class ZimbraAccountService extends AbstractService ...@@ -197,7 +197,8 @@ class ZimbraAccountService extends AbstractService
$account = $value; $account = $value;
} elseif (is_string($value)) { } elseif (is_string($value)) {
$attrs['name'] = $value; $attrs['name'] = $value;
$params = array(); if (isset($params['name'])) unset($params['name']);
$params = $this->getZimbra()->makeZimbraAttributes($params);
$account = new AccountEntity; $account = new AccountEntity;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment