[英]Laravel 4.2 | Auth attempt ignore active status
I'm using laravel 4.2 auth system, trying auth with the next command: 我正在使用laravel 4.2身份验证系统,尝试使用下一个命令进行身份验证:
Auth::attempt(['email' => Input::get('email'), 'password' => Input::get('password'), 'active' => true], true)
The problem is that I'm trying to sign in with user that marked as non-active in the database - the the response is true
. 问题是我正在尝试使用在数据库中标记为非活动的用户登录-响应为
true
。
Any suggestions? 有什么建议么?
I had to modify Auth::attempt awhile back in order to use a Google ID for an internal project at my old job. 我不得不稍作修改Auth :: attempt,以便在我的旧工作中将Google ID用于内部项目。
Basically, you need to extend the attempt method in order to add your active status to the attempt check. 基本上,您需要扩展try方法,以便将活动状态添加到try检查中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.