Guest User

Untitled

a guest
Jan 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. class YourClass extends PasswordBroker
  2. {
  3. public function sendResetLink(array $credentials, Closure $callback = null)
  4. {
  5. $user = $this->getUser($credentials);
  6.  
  7. if (is_null($user) || $user->active != 1) { //add your condition here
  8. return PasswordBrokerContract::INVALID_USER;
  9. }
  10.  
  11. $token = $this->tokens->create($user);
  12.  
  13. $this->emailResetLink($user, $token, $callback);
  14.  
  15. return PasswordBrokerContract::RESET_LINK_SENT;
  16. }
  17. }
Add Comment
Please, Sign In to add comment