I have extended user model to include table profile which has admin_id field. I would like this field populated with the user’s id if they register for the app or by the user id of the user that added them within the app.
I have created the signals to create the record in Profile.
What I want to do:
- A user registers and becomes a user in the app. We will call them User1 with id=1. (I want admin_id in Profile to be set to 1.)
- User1 logs into application and adds User2. User2 has id=2 (I want admin_id in Profile to be set to 1 since User1 added them.)
Is this possible? I have added ability to add users within the application, but I do not how to set the value of admin_id within the signals or elsewhere. Thank you.