Skip to content
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

A user with user.is_active set to true but registration_profile.activated set to false cannot reset their password #3247

Open
jwalgran opened this issue May 17, 2018 · 1 comment
Labels

Comments

@jwalgran
Copy link
Contributor

An invited user can skip over the standard account activation flow. This may be causing the discrepancy between the user.is_active field and the registration_profile.activated field.

user = User.objects.filter(email__iexact=form.cleaned_data['email'],
registrationprofile__activated=False)
if user.exists():
form.add_error(None, ValidationError(_('This account is inactive'),
code='inactive'))
return self.form_invalid(form)

@jwalgran
Copy link
Contributor Author

jwalgran commented Feb 6, 2019

This is also a problem for any account that was created from a mobile app, where we do not require email verification.

RegistrationProfile.objects.create_profile(user)

In the create_user API view we need to set activated = True on the registration profile similar to the way we set active = True on the user model.

@jwalgran jwalgran reopened this Feb 6, 2019
@jwalgran jwalgran removed their assignment Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant