当前位置: 首页>>代码示例>>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;未经允许,请勿转载。