-
Notifications
You must be signed in to change notification settings - Fork 510
Allow users to login using their email address #6522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3d1579d to
4f2cd2e
Compare
7719ba1 to
0032113
Compare
0032113 to
1791333
Compare
2deb725 to
0cd0ccb
Compare
ddbf987 to
57c429c
Compare
|
Hi @ThiefMaster, we'd like to add some template hooks so we can stop overriding some full files and it's related to changes made in this pr. Is it ok to include the hooks here rather than in a separate pr? |
|
Fine for me, if they are too noisy I'll let you know and you can move them to a separate PR. |
0c0d290 to
4a90943
Compare
4a90943 to
519e439
Compare
519e439 to
efe683f
Compare
a9963ac to
5b2a322
Compare
ThiefMaster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving these comments since I already wrote them, but since I'll most likely add some additional things to this PR before merging it, I'm removing the commit adding them from here - please open a new PR to add those hooks.
| <div id="credentials-form" {%- if not form.is_submitted() %} style="display: none;"{% endif %}> | ||
| {{ form_header(form, orientation='vertical', classes='no-block-padding') }} | ||
| {{ form_rows(form) }} | ||
| {{ template_hook('below-account-form', include_form_style=false) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would pass the user here
| {% else %} | ||
| {{ form_header(form, orientation='vertical', classes='no-block-padding') }} | ||
| {{ form_rows(form) }} | ||
| {{ template_hook('below-account-form', new_prefix=true, include_form_style=false) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what new_prefix is supposed to mean, but it does not seem necessary since the code handling the template hook can simply check for if user.local_identity
|
|
||
| {{ form_header(form) }} | ||
| {{ form_rows(form, widget_attrs=widget_attrs) }} | ||
| {{ template_hook('below-account-form') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use this in many different places, with no context whatsoever. I don't think this is a ghood idea. Either pass an argument indicating where it is, but maybe separate hooks (reset-password-below-account-form etc.) may be better.
cc3dc43 to
f72bdf8
Compare
As discussed, this pr is to allow users to login with an email address linked to their account in place of their username, using the same credentials. So the email address will be checked and accepted for login if the password matches the one they already use to login with their username.
It also prevents using an email address as username. This is to avoid using an email address linked to another account as your username.