app/soc/views/helper/access.py
changeset 1716 a387bb7a39d4
parent 1633 6b65707f4248
child 1776 f86b0fe5f4d9
--- a/app/soc/views/helper/access.py	Sat Mar 07 15:22:48 2009 +0000
+++ b/app/soc/views/helper/access.py	Sat Mar 07 16:06:30 2009 +0000
@@ -577,7 +577,10 @@
 
     self.checkIsLoggedIn()
 
-    if not self.user and not user_logic.isFormerAccount(self.id):
+    fields = {'account': self.id}
+    user_entity = user_logic.getForFields(fields, unique=True)
+
+    if not user_entity and not user_logic.isFormerAccount(self.id):
       # this account has not been used yet
       return