jose-lpa / django-tracking-analyzer

User actions tracking and analytics for Django sites :bar_chart:
GNU General Public License v3.0
96 stars 32 forks source link

Update logic to set user instance. #26

Open nareshkumarjaggiexiver opened 3 years ago

nareshkumarjaggiexiver commented 3 years ago

comparison of the 'request.user' class with 'django.contrib.auth.models.User' class before saving the data to the Tracker model is updated with comparison from the output of get_user_model method of "django.contrib.auth"

Comparing the "request.user" with get_user_model method's output will make sure that this module works with the Django Custom User Models.

In the Tracker model for referencing the user, we are already using settings.AUTH_USER_MODEL which works well with the custom user models. This manager was the only place which was preventing the custom user model used to be counted as non-anonymous users.