modified basic_auth.check_login to check that the user has a pw_hash first
This commit is contained in:
parent
569873d8f0
commit
09ae2df4eb
@ -28,9 +28,10 @@ def setup_plugin():
|
||||
|
||||
|
||||
def check_login(user, password):
|
||||
result = auth_lib.bcrypt_check_password(password, user.pw_hash)
|
||||
if result:
|
||||
return result
|
||||
if user.pw_hash:
|
||||
result = auth_lib.bcrypt_check_password(password, user.pw_hash)
|
||||
if result:
|
||||
return result
|
||||
return None
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user