Private
Public Access
1
0

reset emailbounced when user changes email

This commit is contained in:
Sander Roosendaal
2018-03-17 19:39:03 +01:00
parent d64cc9485d
commit d3e3aa1343
2 changed files with 13 additions and 0 deletions

View File

@@ -11231,11 +11231,16 @@ def rower_edit_view(request,rowerid=0,message=""):
getemailnotifications = cd['getemailnotifications']
defaulttimezone=cd['defaulttimezone']
u = r.user
if u.email != email and len(email):
resetbounce = True
else:
resetbounce = False
if len(first_name):
u.first_name = first_name
u.last_name = last_name
if len(email): ## and check_email_freeforuse(u,email):
u.email = email
resetbounce = True
u.save()
@@ -11246,6 +11251,9 @@ def rower_edit_view(request,rowerid=0,message=""):
r.showfavoritechartnotes = showfavoritechartnotes
r.sex = sex
r.birthdate = birthdate
if resetbounce and r.emailbounced:
print "aap"
r.emailbounced = False
r.save()
form = RowerForm(instance=r)
powerform = RowerPowerForm(instance=r)