Marking users as new when created via a backend's authenticate in Django
-
12-11-2019 - |
Question
I have an authentication backend based off a legacy database. When someone logs in using that database and there isn't a corresponding User
record, I create one. What I'm wondering is if there is some way to alert the Django system to this fact, so that for example I can redirect the brand-new user to a different page.
The only thing I can think of is adding a flag to the users' profile record called something like is_new
which is tested once and then set to False
as soon as they're redirected.
Basically, I'm wondering if someone else has figured this out so I don't have to reinvent the wheel.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow