fixed is_crypt in tools, thanks Anthony
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.9.9-stable+timestamp.2014.09.10.08.26.15
|
Version 2.9.9-stable+timestamp.2014.09.11.12.09.36
|
||||||
|
|||||||
+7
-4
@@ -3191,11 +3191,14 @@ class Auth(object):
|
|||||||
if log is DEFAULT:
|
if log is DEFAULT:
|
||||||
log = self.messages['change_password_log']
|
log = self.messages['change_password_log']
|
||||||
passfield = self.settings.password_field
|
passfield = self.settings.password_field
|
||||||
is_crypt = copy.copy([t for t in table_user[passfield].requires
|
requires = table_user[passfield].requires
|
||||||
if isinstance(t,CRYPT)][0])
|
if not isinstance(requires,(list, tuple)):
|
||||||
is_crypt.min_length = 0
|
requires = [requires]
|
||||||
|
requires = filter(lambda t:isinstance(t,CRYPT), requires)
|
||||||
|
if requires:
|
||||||
|
requires[0].min_length = 0
|
||||||
form = SQLFORM.factory(
|
form = SQLFORM.factory(
|
||||||
Field('old_password', 'password', requires=[is_crypt],
|
Field('old_password', 'password', requires=requires,
|
||||||
label=self.messages.old_password),
|
label=self.messages.old_password),
|
||||||
Field('new_password', 'password',
|
Field('new_password', 'password',
|
||||||
label=self.messages.new_password,
|
label=self.messages.new_password,
|
||||||
|
|||||||
Reference in New Issue
Block a user