fixed no-email edit in profile

This commit is contained in:
mdipierro
2018-04-02 23:53:05 -05:00
parent 2237076a5a
commit cec14c741a
4 changed files with 7 additions and 3 deletions
Vendored
+1 -1
View File
@@ -122,7 +122,7 @@ def deploy(appname=None, all=False):
if all=='all' or not backup:
local('zip -r _update.zip * -x *~ -x .* -x \#* -x *.bak -x *.bak2')
else:
else:
local('zip -r _update.zip */*.py */*/*.py views/*.html views/*/*.html static/*')
put('_update.zip','/tmp/_update.zip')
+3 -1
View File
@@ -443,7 +443,9 @@ class AuthAPI(object):
# log messages should not be translated
if type(description).__name__ == 'lazyT':
description = description.m
self.table_event().insert(description=str(description % vars), origin=origin, user_id=user_id)
if self.table_user()[user_id]:
self.table_event().insert(
description=str(description % vars), origin=origin, user_id=user_id)
def id_group(self, role):
"""
+2
View File
@@ -3762,6 +3762,7 @@ class Auth(AuthAPI):
client_side=self.settings.client_side)
passfield = self.settings.password_field
table_user[passfield].writable = False
table_user['email'].writable = False
request = current.request
session = current.session
if next is DEFAULT:
@@ -3772,6 +3773,7 @@ class Auth(AuthAPI):
onaccept = self.settings.profile_onaccept
if log is DEFAULT:
log = self.messages['profile_log']
form = SQLFORM(
table_user,
self.user.id,