mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-26 03:42:20 +00:00
15 lines
402 B
Python
15 lines
402 B
Python
from cas_server.auth import DjangoAuthUser
|
|
|
|
|
|
class CustomAuthUser(DjangoAuthUser):
|
|
"""
|
|
Override Django Auth User model to define a custom Matrix username.
|
|
"""
|
|
|
|
def attributs(self):
|
|
d = super().attributs()
|
|
if self.user:
|
|
d["matrix_username"] = self.user.registration.matrix_username
|
|
d["display_name"] = str(self.user.registration)
|
|
return d
|