Matrix username should never change

This commit is contained in:
Yohann D'ANELLO 2020-10-28 17:37:15 +01:00
parent 642ac94b7a
commit c9be07e45a
1 changed files with 1 additions and 2 deletions

View File

@ -1,5 +1,4 @@
from cas_server.auth import DjangoAuthUser
from django.utils.text import slugify
class CustomAuthUser(DjangoAuthUser):
@ -10,5 +9,5 @@ class CustomAuthUser(DjangoAuthUser):
def attributs(self):
d = super().attributs()
if self.user:
d["matrix_username"] = slugify(str(self.user.registration))
d["matrix_username"] = f"corres2math_{self.user.pk}"
return d