From fe7cc3c4b1651070679290d0ce1464261cad4805 Mon Sep 17 00:00:00 2001 From: David Surville <david.surville@unicaen.fr> Date: Thu, 15 Oct 2020 17:19:07 +0200 Subject: [PATCH] =?UTF-8?q?[Fix]=20Les=20param=C3=A8tres=20n'=C3=A9taient?= =?UTF-8?q?=20pas=20pris=20en=20compte=20lors=20de=20la=20cr=C3=A9ation=20?= =?UTF-8?q?d'un=20compte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UnicaenZimbra/Service/ZimbraAccountService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/UnicaenZimbra/Service/ZimbraAccountService.php b/src/UnicaenZimbra/Service/ZimbraAccountService.php index 708b9c3..40197fe 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; } -- GitLab