Fixes banned people being able to create a new user entity.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- 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