public function register($email, $roles)
 {
     if ($this->repository->get($email) instanceof User) {
         throw UserIsAlreadyRegistered::withEmail($email);
     }
     $this->repository->add(new User($email, $roles));
 }
Example #2
0
 public function get($email)
 {
     return $this->repository->get($email);
 }