Esempio n. 1
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(EmailConfirmationRepository $tokens)
 {
     $tokens->store($this->email, $this->token);
     Mail::queue('emails.auth.email_confirmation', ['email' => $this->email, 'token' => $this->token], function ($m) {
         $m->to($this->email)->subject('Confirmation');
     });
 }
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(EmailConfirmationRepository $tokens)
 {
     $token = str_random(5);
     $tokens->store($this->newEmail, $token);
     Mail::queue('emails.auth.email_change_confirmation', ['new_email' => $this->newEmail, 'token' => $token], function ($m) {
         $m->to($this->newEmail)->subject('Email Change');
     });
 }
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize(EmailConfirmationRepository $tokens)
 {
     return $tokens->verify($this->email, $this->token);
 }
Esempio n. 4
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize(EmailConfirmationRepository $tokens)
 {
     return $tokens->verify($this->input('new_email'), $this->token) && JWTAuth::parseToken()->authenticate();
 }