안녕하세요. 암호 이상 시스템에 이상한 문제가 있습니다. 이 함수에 대한 리턴은 항상 암호 토큰 불일치입니다. 여기Laravel Token For Password Reminder 항상 일치하지 않음
은 제어기에게
<?php
class RemindersController extends Controller {
/**
* Display the password reminder view.
*
* @return Response
*/
public function getRemind()
{
return View::make('resetacc');
}
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email')))
{
case Password::INVALID_USER:
return Redirect::back()->with('message', Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::back()->with('message', Lang::get($response));
}
}
/**
* Display the password reset view for the given token.
*
* @param string $token
* @return Response
*/
public function getReset($token = null)
{
if (is_null($token)) App::abort(404);
return View::make('resetpass')->with('token', $token);
}
/**
* Handle a POST request to reset a user's password.
*
* @return Response
*/
public function postReset()
{
$credentials = Input::only(
'email', 'password', 'password_confirmation', 'token'
);
$response = Password::reset($credentials, function($user, $password)
{
$user->password = Hash::make($password);
$user->save();
});
switch ($response)
{
case Password::INVALID_PASSWORD:
case Password::INVALID_TOKEN:
return Redirect::to('/reset')->with('message', Lang::get($response));
case Password::INVALID_USER:
return Redirect::back()->with('message', Lang::get($response));
case Password::PASSWORD_RESET:
return Redirect::to('/auth')->with('message', 'Password Reset anda berhasil, silahkan login.');
}
}
}
기억하고 Routes.php
Route::get('reset', function() {
return View::make('resetacc');
});
Route::get('password/reset/{token}', array(
'uses' => '[email protected]',
'as' => 'resetpass'
));
데이터베이스에 저장된 토큰 동일 사용자에게 주어진 하나와 동일하다.
내가 laravel 버전 4.1은 다음 4.2.5
에 업데이트 한 때문에 업데이트 프로세스의 그것입니까?
감사
누구든지 도움을 줄 수 있습니까? – randytan