aboutsummaryrefslogtreecommitdiff
path: root/app/dispatchAuth
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatchAuth')
-rw-r--r--app/dispatchAuth/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/dispatchAuth/models.py b/app/dispatchAuth/models.py
index a1c4b55..fe720fd 100644
--- a/app/dispatchAuth/models.py
+++ b/app/dispatchAuth/models.py
@@ -67,7 +67,12 @@ class User(PermissionsMixin, AbstractBaseUser):
return reverse('driver_details', kwargs={'pk': self.pk})
def __str__(self):
- return self.email
+ # return self.email
+ # Show the Identity associated with the user, not the user itself
+ try:
+ return "{} ({} {})".format(self.identity, self.first_name, self.last_name)
+ except:
+ return "{} {} ({})".format(self.first_name, self.last_name, self.email)
def email_user(self, subject, message, from_email=None, **kwargs):
"""Send an email to this user."""