Minor migration fix.
[cas.git] / src / accounts / models.py
index 126fc11..c9aaec6 100644 (file)
@@ -1,4 +1,5 @@
 from django.db import models
+from cas_provider.signals import cas_collect_custom_attributes
 
 
 class Service(models.Model):
@@ -9,3 +10,12 @@ class Service(models.Model):
 
     class Meta:
         ordering = ('ordering', )
+
+
+def user_attributes(sender, user, **kwargs):
+    return {
+        'firstname': user.first_name,
+        'lastname': user.last_name,
+        'email': user.email,
+    }
+cas_collect_custom_attributes.connect(user_attributes)