Exemplo n.º 1
0
 /**
  * Unverify the user's email address.
  *
  * @return void
  */
 public function unverify()
 {
     VerifyEmail::sendVerificationLink($this, function (Message $message) {
         $message->subject($this->getVerifyEmailSubject());
     });
     $this->setVerified(false);
 }
Exemplo n.º 2
0
 /**
  * Attempt to verify a user.
  *
  * @param string $token
  *
  * @return \Illuminate\Http\Response
  */
 public function verify($token)
 {
     $response = VerifyEmail::verify(Auth::user(), $token);
     switch ($response) {
         case VerifyEmail::EMAIL_VERIFIED:
             return redirect($this->redirectPath())->with('status', trans('mustard-auth::verify_emails.verified'));
         default:
             return redirect()->back()->withErrors(['email' => trans('mustard-auth::verify_emails.token')]);
     }
 }