Commit 44dd3d4a601b10cb009cce0412a05dd09d2f5348
Committed by
Sergio Oliveira
1 parent
3e89bbc3
Exists in
master
and in
39 other branches
Set a flag to update or not user's register
Set a boolean field to tell whether a user needs to update its register upon registering/logging in through browserid Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Showing
2 changed files
with
2 additions
and
0 deletions
Show diff stats
colab/accounts/auth.py
@@ -13,6 +13,7 @@ class ColabBrowserIDBackend(BrowserIDBackend): | @@ -13,6 +13,7 @@ class ColabBrowserIDBackend(BrowserIDBackend): | ||
13 | extra_fields = { | 13 | extra_fields = { |
14 | 'first_name': "Colab", | 14 | 'first_name': "Colab", |
15 | 'last_name': "Colab", | 15 | 'last_name': "Colab", |
16 | + 'needs_update': True | ||
16 | } | 17 | } |
17 | 18 | ||
18 | user = self.User.objects.filter(emails__address=email) | 19 | user = self.User.objects.filter(emails__address=email) |
colab/accounts/models.py
@@ -26,6 +26,7 @@ class User(AbstractUser): | @@ -26,6 +26,7 @@ class User(AbstractUser): | ||
26 | verification_hash = models.CharField(max_length=32, null=True, blank=True) | 26 | verification_hash = models.CharField(max_length=32, null=True, blank=True) |
27 | modified = models.DateTimeField(auto_now=True) | 27 | modified = models.DateTimeField(auto_now=True) |
28 | bio = models.CharField(max_length=200, null=True, blank=True) | 28 | bio = models.CharField(max_length=200, null=True, blank=True) |
29 | + needs_update = models.BooleanField(default=False) | ||
29 | 30 | ||
30 | def check_password(self, raw_password): | 31 | def check_password(self, raw_password): |
31 | 32 |