/** * Confirm account * * @param $email * @param $token * @return bool|User */ public function confirm($email, $token) { $user = $this->userRepo->findByEmailAndToken($email, $token); if ($user && $token) { $user = $this->userRepo->update($user, ['confirmation_code' => '', 'status' => 1]); event(new UserWasConfirmed($user)); $this->auth->login($user); return $user; } return false; }