app/soc/views/helper/access.py
changeset 1048 0fe0cb8f7253
parent 1043 5e15994b2033
child 1061 09c243461de8
--- a/app/soc/views/helper/access.py	Wed Jan 28 17:31:02 2009 +0000
+++ b/app/soc/views/helper/access.py	Wed Jan 28 17:33:05 2009 +0000
@@ -358,12 +358,14 @@
 
     self.checkIsLoggedIn(django_args)
 
-    if self.user or user_logic.isFormerAccount(self.id):
-      message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
-          'email' : self.id.email()}
-      raise out_of_band.LoginRequest(message_fmt=message_fmt)
+    if not self.user and not user_logic.isFormerAccount(self.id):
+      # this account has not been used yet
+      return
 
-    return
+    message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
+        'email' : self.id.email()}
+    raise out_of_band.LoginRequest(message_fmt=message_fmt)
+
 
   def checkHasUserEntity(self, django_args):
     """Raises an alternate HTTP response if Google Account has no User entity.