How do I know which user added another user?
User A registers and is assigned admin status. User A adds User B within the application. How can I save User A in my extended user model so I know who has added who? This is a multi-tenant application. Django/Postgres
Added this to view for adding new users from within application.
if form.is_valid():
obj = form.save()
obj.profile.admin_id = request.user.id
obj.profile.save()
return redirect(‘dashboard’)
Thank you to Lúcio Henrique.