Commit 837a3165 authored by Jérome Perrin's avatar Jérome Perrin

authentication_policy: check isPasswordValid on the login corresponding to that username

Useful in the context of password reset
parent a868860f
......@@ -14,4 +14,11 @@ def doValidation(login, password):
raise ValidationError('external_validator_failed', context, error_text=message)
return 1
user_login = request.get('field_user_login', None)
# find login account provider and validate it on it (password recovered for an existing account)
if user_login:
login = context.Base_getLoginValueByUserName(user_name)
if user is not None:
return doValidation(login, password)
return doValidation(context, password)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment