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


PHP Confide::resetPassword方法代碼示例

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


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

示例1: do_reset_password

 /**
  * Attempt change password of the user
  *
  */
 public function do_reset_password()
 {
     $input = array('token' => Input::get('token'), 'password' => Input::get('password'), 'password_confirmation' => Input::get('password_confirmation'));
     // By passing an array with the token, password and confirmation
     if (Confide::resetPassword($input)) {
         $notice_msg = Lang::get('confide::confide.alerts.password_reset');
         return Redirect::action('UserController@login')->with('notice', $notice_msg);
     } else {
         $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');
         return Redirect::action('UserController@reset_password', array('token' => $input['token']))->withInput()->with('error', $error_msg);
     }
 }
開發者ID:ehumps,項目名稱:rendezview,代碼行數:16,代碼來源:UserController.php

示例2: postReset

 /**
  * Attempt change password of the user
  *
  */
 public function postReset()
 {
     $input = array('token' => Input::get('token'), 'password' => Input::get('password'), 'password_confirmation' => Input::get('password_confirmation'));
     // By passing an array with the token, password and confirmation
     if (Confide::resetPassword($input)) {
         return Redirect::to('user/login')->with('notice', Lang::get('confide::confide.alerts.password_reset'));
     } else {
         return Redirect::to('user/reset/' . $input['token'])->withInput()->with('error', Lang::get('confide::confide.alerts.wrong_password_reset'));
     }
 }
開發者ID:hilmysyarif,項目名稱:l4-bootstrap-admin,代碼行數:14,代碼來源:UserController.php

示例3: do_reset_password

 /**
  * Attempt change password of the user
  *
  */
 public function do_reset_password()
 {
     if (Auth::check()) {
         $rules = ['password' => 'required|between:4,11|confirmed', 'password_confirmation' => 'between:4,11'];
         $validator = Validator::make(Input::all(), $rules);
         if ($validator->fails()) {
             return Redirect::to('user/reset')->withInput()->withErrors($validator);
         }
         $user = Auth::user();
         $user->password = Input::get('password');
         $user->save();
         Session::flash('message', trans('texts.confide.password_reset'));
         return Redirect::to('/dashboard');
     } else {
         $input = array('token' => Input::get('token'), 'password' => Input::get('password'), 'password_confirmation' => Input::get('password_confirmation'));
         // By passing an array with the token, password and confirmation
         if (Confide::resetPassword($input)) {
             $notice_msg = trans('texts.confide.password_reset');
             return Redirect::action('UserController@login')->with('notice', $notice_msg);
         } else {
             $error_msg = trans('texts.confide.wrong_password_reset');
             return Redirect::action('UserController@reset_password', array('token' => $input['token']))->withInput()->with('error', $error_msg);
         }
     }
 }
開發者ID:aleguisf,項目名稱:fvdev1,代碼行數:29,代碼來源:UserController.php

示例4: postReset

 public function postReset()
 {
     $input = array('token' => Input::get('token'), 'password' => Input::get('password'), 'password_confirmation' => Input::get('password_confirmation'));
     return Confide::resetPassword($input) ? Redirect::to('user/login')->with('success', Lang::get('confide::confide.alerts.password_reset')) : Redirect::to('user/reset/' . $input['token'])->withInput()->with('error', Lang::get('confide::confide.alerts.wrong_password_reset'));
 }
開發者ID:Aranjedeath,項目名稱:Laravel_Starter,代碼行數:5,代碼來源:SiteUserService.php


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