Loading src/UnicaenZimbra/Service/ZimbraAccountService.php +2 −6 Original line number Diff line number Diff line Loading @@ -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(); Loading @@ -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]); Loading Loading
src/UnicaenZimbra/Service/ZimbraAccountService.php +2 −6 Original line number Diff line number Diff line Loading @@ -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(); Loading @@ -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]); Loading