Moo*_*les 8 php internet-explorer login laravel-5 microsoft-edge
使用Laravel 5登录无法使用Edge和Internet Explorer,而在其他浏览器中工作得非常好.
我们怀疑它与没有正确存储的会话有关,但说实话,我们不知道导致这个问题的原因.
当我们使用适当的详细信息登录时,登录逻辑被激活并正确完成,但之后它刚刚重定向回登录页面,因此中间件可能认为用户未登录并将其返回到登录页面,这就是我们认为与会议有关的原因.
这是我们的登录脚本:
$rules = array('email' => 'required|email|min:3|max:60',
'password' => 'required|min:6|max:20');
$attributeNames = array(
'email' => strtolower(Lang::get('auth.email')),
'password' => strtolower(Lang::get('auth.password')),
);
$validator = Validator::make(Input::all(), $rules);
$validator->setAttributeNames($attributeNames);
if ($validator->fails()){ return Redirect::back()->withErrors($validator); die(); }
//Make an login attempt
$auth = Auth::attempt(array(
'email' => Input::get('email'),
'password' => Input::get('password'),
'role' => 'admin'
), false);
if(!$auth){
$auth2 = Auth::attempt(array(
'email' => Input::get('email'),
'password' => Input::get('password'),
'role' => 'user'
), false);
if(!$auth2){
return Redirect::back()->withErrors(Lang::get('auth.errorText'))->withInput(Input::all());
die();
}
}
//If user is not activated
if(Auth::User()->activated != 'OK'){
Auth::logout();
return Redirect::back()->withErrors(Lang::get('auth.notActivated'));
die();
}
if(Auth::User()->sms_verificatie == '1') {
$user = Auth::User();
$user->sms_ok = 0;
$user->save();
$sms_codes_verwijderen = UsersSMSLogin::where('id_cms_users','=',Auth::User()->id)->delete();
return Redirect::route('sms-verificatie');
die();
}
Session::forget('dashboard_werkgever');
return Redirect::route('dashboard');
Run Code Online (Sandbox Code Playgroud)
更改cookie名称以删除_(下划线)为我工作.
在app/config/session.php改变
'cookie' => 'laravel_session'
至
'cookie' => 'laravelsession'