mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Only allow login via LDAP if the user was already imported or created via LDAP
This commit is contained in:
parent
d03c167d3b
commit
68b9ffb908
|
@ -75,8 +75,8 @@ class AuthController extends Controller
|
|||
LOG::debug("LDAP user ".$request->input('username')." successfully bound to LDAP");
|
||||
}
|
||||
|
||||
// Check if the user exists in the database
|
||||
$user = User::where('username', '=', Input::get('username'))->whereNull('deleted_at')->first();
|
||||
// Check if the user already exists in the database and was imported via LDAP
|
||||
$user = User::where('username', '=', Input::get('username'))->whereNull('deleted_at')->where('ldap_import','=',1)->first();
|
||||
LOG::debug("Local auth lookup complete");
|
||||
|
||||
// The user does not exist in the database. Try to get them from LDAP.
|
||||
|
|
Loading…
Reference in a new issue