/**
  * Execute the command.
  *
  * @return void
  */
 public function handle(UserRepositoryInterface $users, Hasher $hasher)
 {
     if (!($user = $users->findByResetToken($this->token))) {
         throw new DisplayException('auth::reset.error');
     }
     $users->resetPassword($user, $hasher->make($this->password));
 }
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle(UserRepositoryInterface $user)
 {
     return $user->register($this->attributes);
 }
Beispiel #3
0
 /**
  * Run after the handled command.
  *
  * @param	Cerbero\Auth\Repositories\UserRepositoryInterface	$user
  * @param	mixed	$handled
  * @param	Cerbero\Auth\Commands\Command	$command
  * @return	mixed
  */
 public function after(UserRepositoryInterface $user, $handled, $command)
 {
     $user->assignResetToken($handled, $command->email);
 }