[snowy: 11/26] Add openid_user property to user profile



commit 270f7bdbb5c7e23a741a2c2906a113392db55a49
Author: Leon Handreke <leon handreke gmail com>
Date:   Thu May 13 23:00:59 2010 +0200

    Add openid_user property to user profile

 accounts/models.py             |    1 +
 lib/django_openid_auth/auth.py |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/accounts/models.py b/accounts/models.py
index 6eeb141..56aa642 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -34,6 +34,7 @@ class UserProfile(models.Model):
                                 verbose_name=_(u'Application Language'),
                                 null=True, blank=True)
     display_name = models.CharField(_('display name'), max_length=80)
+    openid_user = models.BooleanField(verbose_name=_(u'OpenID User'),)
 
     def __unicode__(self):
         return str(self.user)
diff --git a/lib/django_openid_auth/auth.py b/lib/django_openid_auth/auth.py
index 4cbd402..bccd729 100644
--- a/lib/django_openid_auth/auth.py
+++ b/lib/django_openid_auth/auth.py
@@ -120,6 +120,7 @@ class OpenIDBackend:
             i += 1
 
         user = User.objects.create_user(username, email, password=None)
+        user.get_profile().openid_user = True
 
         if sreg_response:
             self.update_user_details_from_sreg(user, sreg_response)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]