|
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"] = f"corres2math_{self.user.pk}"
|
|
return d
|