Commit 764aba45 authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_authentication_policy: Include a fail safe in case the Login isn't under Person

See merge request !1478
parents 0774a0a6 8d25b776
Pipeline #16892 passed with stage
in 0 seconds
......@@ -69,8 +69,8 @@ if portal.portal_preferences.isPrefferedForceUsernameCheckInPassword():
lower_password = password.lower()
if not is_temp_object:
# real object
first_name = context.getFirstName()
last_name = context.getLastName()
first_name = getattr(context, 'getFirstName', context.getTitle)()
last_name = getattr(context, 'getLastName', context.getReference)()
else:
# temporary object
first_name = getattr(context, 'first_name', None)
......
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