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
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
        }