Answer the question
In order to leave comments, you need to log in
How to organize a user password change at the first login?
Many people know the principle of working in operating systems, when the system administrator creates a user, assigns him a certain password and indicates that the first time a conscious user logs in to the system, he will be prompted to change the password to a new one. How to implement the same on a site created with Django?
There were thoughts to somehow use the fact that when creating a user through the admin panel, the last_login field in the database is empty. But these are just thoughts. Maybe someone has already implemented something similar. Share your experience. Thank you.
Answer the question
In order to leave comments, you need to log in
As an option:
1. The user registration service generates a new temporary password and sends it by mail + this user has the PwdChangeRequired = true flag set.
2. The user logs in with that temporary password, the system knows who is logged in and checks the flag for true and redirects it to the password change form.
PS: I'm not familiar with Django
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question