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


PHP CanResetPassword::save方法代碼示例

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


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

示例1: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword|User|ServiceUser $user
  * @param  string                                                       $password
  */
 protected function resetPassword($user, $password)
 {
     $user->password_text = bcrypt($password);
     $user->save();
     /** @noinspection PhpUndefinedMethodInspection */
     Auth::login($user);
 }
開發者ID:rajeshpillai,項目名稱:dfe-common,代碼行數:13,代碼來源:CommonPasswordController.php

示例2: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword $user
  * @param  string $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $passwordService = new PasswordService();
     $user->user_pass = $passwordService->wp_hash_password($password);
     $user->save();
     Auth::guard($this->getGuard())->login($user);
 }
開發者ID:jjiko,項目名稱:blog,代碼行數:14,代碼來源:ResetsPasswords.php

示例3: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword $user
  * @param  string $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     event(new UserPasswordChanged($user, $password));
     Auth::login($user);
 }
開發者ID:linhntaim,項目名稱:katniss,代碼行數:14,代碼來源:PasswordController.php

示例4: sendNewPassword

 public function sendNewPassword(CanResetPassword $user)
 {
     $password = str_random(8);
     $user->password = $password;
     $user->save();
     $this->mailer->send('auth::emails.new_password', compact('user', 'password'), function ($m) use($user) {
         $m->to($user->getEmailForPasswordReset());
     });
 }
開發者ID:laravolt,項目名稱:auth,代碼行數:9,代碼來源:Password.php

示例5: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     // Do not crypt the password here, the User model does it.
     $user->password = $password;
     $user->save();
     $user->emailPasswordChange();
     Auth::login($user);
 }
開發者ID:sroutier,項目名稱:laravel-5.1-enterprise-starter-kit,代碼行數:15,代碼來源:PasswordController.php

示例6: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password_301 = bcrypt($password);
     $user->save();
     // if redirect to user zone, we set new user on Auth
     //auth($this->getGuard())->login($user);
 }
開發者ID:syscover,項目名稱:crm,代碼行數:14,代碼來源:PasswordController.php

示例7: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword $user
  * @param  string                                      $password
  * @author Cali
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     Auth::guard($this->getGuard())->login($user);
 }
開發者ID:projnoah,項目名稱:noah,代碼行數:13,代碼來源:ResetsPasswords.php

示例8: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     //$user->password = bcrypt($password);
     // Sentry hashes password for us
     $user->password = $password;
     $user->save();
     //Auth::login($user);
 }
開發者ID:mycrazydog,項目名稱:mm-shibboleth,代碼行數:15,代碼來源:PasswordController.php

示例9: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     $this->auth->login($user);
 }
開發者ID:Jachase,項目名稱:Laravel-shop,代碼行數:13,代碼來源:PasswordController.php

示例10: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = $password;
     $user->save();
     auth()->login($user);
 }
開發者ID:BhattaRj,項目名稱:pms,代碼行數:13,代碼來源:PasswordController.php

示例11: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     /*
      * --------------------------------------------------------------------------
      * Update password
      * --------------------------------------------------------------------------
      * Hash new password and update database related the user.
      */
     $user->password = bcrypt($password);
     $user->save();
     /*
      * --------------------------------------------------------------------------
      * Send email notification
      * --------------------------------------------------------------------------
      * Make sure user is noticed by email information that they recently change
      * their password.
      */
     Mail::send('emails.admin.reset', ['name' => $user->name], function ($message) use($user) {
         $message->from(env('MAIL_ADDRESS', 'no-reply@infogue.id'), env('MAIL_NAME', 'Infogue.id'));
         $message->replyTo('no-reply@infogue.id', env('MAIL_NAME', 'Infogue.id'));
         $message->to($user->email)->subject('Password has been reset');
     });
     Auth::guard($this->getGuard())->login($user);
 }
開發者ID:anggadarkprince,項目名稱:infogue,代碼行數:31,代碼來源:PasswordController.php

示例12: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param \Illuminate\Contracts\Auth\CanResetPassword $user
  * @param string                                      $password
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     $this->fireEvent('reset.success', request(), 'Password reset', false);
     auth()->login($user);
 }
開發者ID:austinkregel,項目名稱:laravel-auth-login,代碼行數:13,代碼來源:PasswordController.php

示例13: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = $password;
     // no need to bcrypt here as passwords are automatically hashed in User Model
     $user->save();
     Auth::login($user);
 }
開發者ID:darryldecode,項目名稱:laravelbackend,代碼行數:14,代碼來源:PasswordController.php

示例14: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->passwd = Hash::make($user . $password);
     $user->save();
     Auth::login($user);
 }
開發者ID:huludini,項目名稱:pw-web,代碼行數:13,代碼來源:PasswordController.php

示例15: resetPassword

 /**
  * Reset the given user's password.
  *
  * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
  * @param  string  $password
  * @return void
  */
 protected function resetPassword($user, $password)
 {
     $user->password = bcrypt($password);
     $user->save();
     Auth::login($user);
 }
開發者ID:TrinhKien94,項目名稱:ttt,代碼行數:13,代碼來源:ResetsPasswords.php


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