This commit is contained in:
James Cole
2019-08-22 17:06:43 +02:00
parent 10737d10a5
commit 2a4051fe92
5 changed files with 175 additions and 59 deletions

View File

@@ -39,14 +39,6 @@ interface UserRepositoryInterface
*/
public function all(): Collection;
/**
* Set MFA code.
*
* @param User $user
* @param string|null $code
*/
public function setMFACode(User $user, ?string $code): void;
/**
* Gives a user a role.
*
@@ -64,9 +56,9 @@ interface UserRepositoryInterface
* @param User $user
* @param string $newEmail
*
* @return bool
* @see updateEmail
*
* @return bool
*/
public function changeEmail(User $user, string $newEmail): bool;
@@ -162,6 +154,21 @@ interface UserRepositoryInterface
*/
public function hasRole(User $user, string $role): bool;
/**
* Remove any role the user has.
*
* @param User $user
*/
public function removeRole(User $user): void;
/**
* Set MFA code.
*
* @param User $user
* @param string|null $code
*/
public function setMFACode(User $user, ?string $code): void;
/**
* @param array $data
*
@@ -191,9 +198,9 @@ interface UserRepositoryInterface
* @param User $user
* @param string $newEmail
*
* @return bool
* @see changeEmail
*
* @return bool
*/
public function updateEmail(User $user, string $newEmail): bool;
}