/** * Send the account confirmation link via e-mail. * * @param \Daylight\Contracts\Auth\CanConfirmAccount $user * @param string $token * @param \Closure|null $callback * @return int */ public function emailConfirmationLink(CanConfirmAccountContract $user, $token, Closure $callback = null) { // We will use the confirmation view that was given to the broker to display the // account confirmation e-mail. We'll pass a "token" variable into the views // so that it may be displayed for an user to click for account confirmation. $view = $this->emailView; return $this->mailer->send($view, compact('token', 'user'), function ($m) use($user, $token, $callback) { $m->to($user->getEmailForAccountConfirmation()); if (!is_null($callback)) { call_user_func($callback, $m, $user, $token); } }); }
/** * Delete all existing reset tokens from the database. * * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @return int */ protected function deleteExisting(CanConfirmAccountContract $user) { return $this->getTable()->where('email', $user->getEmailForAccountConfirmation())->delete(); }