Fix crash on no email provided to edit user
This commit is contained in:
@@ -52,7 +52,7 @@ def user_profile_page(username):
|
|||||||
|
|
||||||
if user.checkPerm(current_user, Permission.CHANGE_EMAIL):
|
if user.checkPerm(current_user, Permission.CHANGE_EMAIL):
|
||||||
newEmail = form["email"].data
|
newEmail = form["email"].data
|
||||||
if newEmail != user.email:
|
if newEmail != user.email and newEmail.strip() != "":
|
||||||
token = randomString(32)
|
token = randomString(32)
|
||||||
|
|
||||||
ver = UserEmailVerification()
|
ver = UserEmailVerification()
|
||||||
|
|||||||
Reference in New Issue
Block a user