fixed problem with login bare when registration_key is None
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.9.4-stable+timestamp.2014.03.08.14.39.02
|
Version 2.9.4-stable+timestamp.2014.03.09.08.54.17
|
||||||
|
|||||||
+5
-4
@@ -2062,8 +2062,9 @@ class Auth(object):
|
|||||||
if user and user.get(settings.passfield, False):
|
if user and user.get(settings.passfield, False):
|
||||||
password = settings.table_user[
|
password = settings.table_user[
|
||||||
settings.passfield].validate(password)[0]
|
settings.passfield].validate(password)[0]
|
||||||
if not user.registration_key.strip() and password == \
|
if ((user.registration_key is None or
|
||||||
user[settings.passfield]:
|
not user.registration_key.strip()) and
|
||||||
|
password == user[settings.passfield]):
|
||||||
self.login_user(user)
|
self.login_user(user)
|
||||||
return user
|
return user
|
||||||
else:
|
else:
|
||||||
@@ -2349,8 +2350,8 @@ class Auth(object):
|
|||||||
elif temp_user.registration_key in ('disabled', 'blocked'):
|
elif temp_user.registration_key in ('disabled', 'blocked'):
|
||||||
response.flash = self.messages.login_disabled
|
response.flash = self.messages.login_disabled
|
||||||
return form
|
return form
|
||||||
elif not temp_user.registration_key is None and \
|
elif (not temp_user.registration_key is None
|
||||||
temp_user.registration_key.strip():
|
and temp_user.registration_key.strip()):
|
||||||
response.flash = \
|
response.flash = \
|
||||||
self.messages.registration_verifying
|
self.messages.registration_verifying
|
||||||
return form
|
return form
|
||||||
|
|||||||
Reference in New Issue
Block a user