if (Auth::attempt(array('email' => $email, 'password' => $password, 'active' => 1)))
{
// The user is active, not suspended, and exists.
}
Run Code Online (Sandbox Code Playgroud)
在Laravel 5.3,你可能要覆盖Illuminate\Foundation\Auth\AuthenticatesUsers的credentials方法在App\HTTP\\控制器验证\ LoginController中添加'active' => 1.
| 归档时间: |
|
| 查看次数: |
2399 次 |
| 最近记录: |