當前位置: 首頁>>代碼示例>>PHP>>正文


PHP User::whereConfirmationCode方法代碼示例

本文整理匯總了PHP中app\User::whereConfirmationCode方法的典型用法代碼示例。如果您正苦於以下問題:PHP User::whereConfirmationCode方法的具體用法?PHP User::whereConfirmationCode怎麽用?PHP User::whereConfirmationCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\User的用法示例。


在下文中一共展示了User::whereConfirmationCode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getConfirmation

 public function getConfirmation($code)
 {
     // dd($code);
     if ($user = \App\User::whereConfirmationCode($code)->first()) {
         $user->update(['confirmed' => 1]);
         $this->auth->login($user);
         return redirect()->intended($this->redirectPath())->with('message', trans('login.confirmation.confirmed'));
     }
     // return view('auth.confirmation_error');
 }
開發者ID:sotoplatero,項目名稱:lacallemonte,代碼行數:10,代碼來源:AuthController.php

示例2: confirmEmail

 public function confirmEmail($token)
 {
     $result = User::where('confirmation_code', '=', $token)->get();
     if (!$result->isEmpty()) {
         User::whereConfirmationCode($token)->firstOrFail()->confirmEmail();
         flash()->success('Your account was successfully registered.');
         return redirect('/');
     } else {
         flash()->error('That code was incorrect, please make sure you follow the link in the verification email.');
         return redirect('/');
     }
 }
開發者ID:mawz2042,項目名稱:remindr,代碼行數:12,代碼來源:RegistrationController.php

示例3: confirm

 public function confirm($confirmationcode)
 {
     $user = User::whereConfirmationCode($confirmationcode)->first();
     if (!$user) {
         return view("auth.invalid");
     } else {
         $user->confirmed = 1;
         $user->confirmation_code = null;
         $user->save();
         return view("auth.confirmed");
     }
 }
開發者ID:gerardo15,項目名稱:4sale,代碼行數:12,代碼來源:HomeController.php

示例4: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         abort(404);
     }
     $user = \App\User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         abort(404);
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     Session::flash('success', 'alt');
     return redirect('auth/login');
 }
開發者ID:veljkodjokic,項目名稱:Learn_ON,代碼行數:15,代碼來源:RegistrationController.php

示例5: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         return $confirmation_code;
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         return view("doverification")->with(['message' => 'you are  already registered user please login', "button_message" => 'Login', 'button_url' => '/home']);
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     return view('doverification')->with(['message' => 'your account has been verifed !!!', 'button_message' => 'Login', 'button_url' => '/home']);
     //  return Redirect::route('login_path');
 }
開發者ID:rahul1205,項目名稱:newstudyhere,代碼行數:15,代碼來源:RegistrationController.php

示例6: confirm

 /**
  * Confirm a new user from email
  * @param $confirmation_code
  * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         return redirect('auth/login')->withErrors('You lose a confirmation code!');
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         return redirect('auth/login')->withErrors('Wrong confirmation code!');
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     Flash::message('You have successfully verified your account.');
     return redirect('auth/login');
 }
開發者ID:EriksZviedrans,項目名稱:myTvnetFeed,代碼行數:20,代碼來源:AuthController.php

示例7: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         return "error";
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         return "error";
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     $this->dispatch(new SendConfirmationEmail($user));
     return "confirmed";
 }
開發者ID:Scaledesk,項目名稱:gritwings,代碼行數:15,代碼來源:RegistrationController.php

示例8: getVerify

 /**
  * Verify the user's account, via confirmation link.
  *
  * @param $confirmation_code
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  * @throws InvalidConfirmationCodeException
  */
 public function getVerify($confirmation_code = null)
 {
     if (!$confirmation_code) {
         throw new InvalidConfirmationCodeException(trans('register-page.flash-2'));
     }
     $user = User::whereConfirmationCode($confirmation_code);
     if (!$user instanceof User) {
         throw new InvalidConfirmationCodeException(trans('register-page.flash-3'));
     }
     $user->confirmation_code = null;
     $user->active = 1;
     $user->save();
     Session::flash('flash_message', trans('register-page.flash-4'));
     return redirect('/');
 }
開發者ID:andreikainer,項目名稱:kuj_abol,代碼行數:22,代碼來源:AuthController.php

示例9: confirm

 public function confirm($codigo)
 {
     if (!$codigo) {
         throw new InvalidConfirmationCodeException();
     }
     $user = User::whereConfirmationCode($codigo)->first();
     if (!$user) {
         throw new InvalidConfirmationCodeException();
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     \Session::flash('flash_message', 'Conta Verificada com Sucesso!');
     return redirect('home');
     //Ainda nao cadastrou, solicitar o cadastro
 }
開發者ID:prasist,項目名稱:prjwebch,代碼行數:16,代碼來源:HomeController.php

示例10: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         return Redirect('auth/login');
         //throw new InvalidConfirmationCodeException;
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         return Redirect('/');
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     Flash::message('You have successfully verified your account.');
     return Redirect('home');
 }
開發者ID:xhulioh25,項目名稱:kryqi-i-kuq,代碼行數:16,代碼來源:RegistrationController.php

示例11: confirm

 public function confirm($email, $confirmation_code)
 {
     if (!$confirmation_code) {
         // throw new InvalidConfirmationCodeException;
     }
     $user = \App\User::whereConfirmationCode($confirmation_code)->whereEmail($email)->first();
     if (!$user) {
         // throw new InvalidConfirmationCodeException;
         // или подтвержден или нет такого пользователя или не правильный код
         return \Redirect::to('login');
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     \Session::flash('verify_message', 'You successfuly confirmed');
     return \Redirect::to('login');
 }
開發者ID:aleximillers,項目名稱:estore-laravel-angular,代碼行數:17,代碼來源:RegisterController.php

示例12: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         throw new InvalidConfirmationCodeException();
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         echo "error ";
         exit;
     }
     $user->confirmed = 1;
     //$user->confirmation_code = null;
     $user->save();
     flash('Votre compte a été confirmé avec succès, vous êtes à présent connecté.');
     Auth::login($user);
     return redirect('/home');
 }
開發者ID:nerg,項目名稱:testLaravel,代碼行數:17,代碼來源:RegistrationController.php

示例13: confirm

 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         throw new InvalidConfirmationCodeException();
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         //throw new InvalidConfirmationCodeException;
     }
     $user->activation = 1;
     $user->confirmation_code = null;
     $user->save();
     \Session::flash('status', 'You have been successfully verified!');
     return redirect('login');
 }
開發者ID:SAEMA,項目名稱:project,代碼行數:15,代碼來源:RegistrationController.php

示例14: getUserByCode

 /**
  * Get user by given confirmation code.
  * 
  * @param string $code
  *
  * @return \App\User
  */
 public function getUserByCode($code)
 {
     return User::whereConfirmationCode($code)->whereConfirmed(false)->firstOrFail();
 }
開發者ID:pingpong-labs,項目名稱:confirmation,代碼行數:11,代碼來源:Confirmator.php

示例15: confirm

 /**
  * @param $confirmation_code
  * @throws InvalidConfirmationCodeException if the confirmation_code or user are not found
  * @return mixed
  */
 public function confirm($confirmation_code)
 {
     if (!$confirmation_code) {
         throw new InvalidConfirmationCodeException();
         //@todo setup Exception
     }
     $user = User::whereConfirmationCode($confirmation_code)->first();
     if (!$user) {
         throw new InvalidConfirmationCodeException();
         //@todo setup Exception
     }
     $user->confirmed = 1;
     $user->confirmation_code = null;
     $user->save();
     //        Flash::message('You have successfully verified your account.'); //@todo flash messaging untested, commenting out for now
     $this->sendWelcomeEmail($user);
     $this->auth->login($user);
     return redirect('home');
 }
開發者ID:J-Fricke,項目名稱:simpleLoginWebApp,代碼行數:24,代碼來源:AuthController.php


注:本文中的app\User::whereConfirmationCode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。