Advertisement
Guest User

Untitled

a guest
Nov 10th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. public function getActivate($userId, $activationCode) {
  2.             $user = User::find($userId);
  3.             if (!$user) {
  4.                 return $this->getMessage("Неверная ссылка на активацию аккаунта.");
  5.             }
  6.             if ($user->activate($activationCode)) {
  7.                 Auth::login($user);
  8.                 return $this->getMessage("Аккаунт активирован", "/");
  9.             }
  10.          
  11.             return $this->getMessage("Неверная ссылка на активацию аккаунта, либо учетная запись уже активирована.");
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement