0
Laravel 인증이 완벽하게 작동합니다. 비밀번호 변경 기능이 포함되었습니다. 암호를 변경 한 후 첫 번째 사용자 (uid = "1")를 제외한 모든 사용자에 대해 로그인이 정상적으로 작동합니다. 이 사용자에게는 기본 암호 해시 만 작동합니다. 다른 암호 해시의 경우 로그인 시도가 실패합니다. 내 코드는 아래에 주어진다 :암호 변경 후 Laravel Auth :: attempt()가 실패 함
사용자 컨트롤러 로그인 완료을
public function postSignin() {
if (Auth::attempt(array('email'=>Input::get('email'), 'password'=>Input::get('password')))) {
return Redirect::to('users/dashboard')->with(array('message' => 'You are now logged in!', 'email' => Input::get('email')));
} else {
return Redirect::to('users/login')
->with('message', 'Your username/password combination was incorrect')
->withInput();
}
}
테이블 스키마
Schema::create('users', function($table)
{
$table->increments('id');
$table->string('firstname', 20);
$table->string('lastname', 20);
$table->string('email', 100)->unique();
$table->string('password', 255);
$table->string('remember_token', 255);
$table->timestamps();
});
비밀번호 변경 컨트롤러 기능
public function postUpass() {
$user = User::find(Input::get('uid'));
if((Input::get('password'))==(Input::get('passconf'))){
$user->password = Hash::make(trim(Input::get('password')));
$user->save();
echo "Done";
//echo Hash::make(trim(Input::get('password')));
}
else {
echo "Check Passwords Again";
}
누군가 제발 도와주세요.