Merge branch 'master' of https://github.com/web2py/web2py into pydal-pip
Conflicts: gluon/dal/_load.py
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ def app_cleanup(app, request):
|
|||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
for f in os.listdir(path):
|
for f in os.listdir(path):
|
||||||
try:
|
try:
|
||||||
if f[:1] != '.': os.unlink(os.path.join(path, f))
|
if f[:1] != '.': recursive_unlink(os.path.join(path, f))
|
||||||
except IOError:
|
except IOError:
|
||||||
r = False
|
r = False
|
||||||
return r
|
return r
|
||||||
|
|||||||
@@ -3097,10 +3097,15 @@ class Auth(object):
|
|||||||
IS_EMAIL(error_message=self.messages.invalid_email),
|
IS_EMAIL(error_message=self.messages.invalid_email),
|
||||||
IS_IN_DB(self.db, table_user.email,
|
IS_IN_DB(self.db, table_user.email,
|
||||||
error_message=self.messages.invalid_email)]
|
error_message=self.messages.invalid_email)]
|
||||||
|
if not self.settings.email_case_sensitive:
|
||||||
|
table_user.email.requires.insert(0, IS_LOWER())
|
||||||
else:
|
else:
|
||||||
table_user.username.requires = [
|
table_user.username.requires = [
|
||||||
IS_IN_DB(self.db, table_user.username,
|
IS_IN_DB(self.db, table_user.username,
|
||||||
error_message=self.messages.invalid_username)]
|
error_message=self.messages.invalid_username)]
|
||||||
|
if not self.settings.username_case_sensitive:
|
||||||
|
table_user.username.requires.insert(0, IS_LOWER())
|
||||||
|
|
||||||
form = SQLFORM(table_user,
|
form = SQLFORM(table_user,
|
||||||
fields=[userfield],
|
fields=[userfield],
|
||||||
hidden=dict(_next=next),
|
hidden=dict(_next=next),
|
||||||
|
|||||||
Reference in New Issue
Block a user