OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

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

Open jwalgran opened 6 years ago

jwalgran commented 6 years ago

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.

https://github.com/OpenTreeMap/otm-core/blob/7ea8b1f55e4388b89c0bce8ae7289f0766f8c77e/opentreemap/registration_backend/views.py#L211-L216

jwalgran commented 5 years ago

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

https://github.com/OpenTreeMap/otm-core/blob/7b57c6ef96cd66f4381105af009f22f52938bfd7/opentreemap/api/user.py#L115

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.