mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 15:28:37 -05:00
Allow users to remove their email address.
This commit is contained in:
@@ -645,7 +645,17 @@ class ApiController(RedditController):
|
||||
_("you should be getting a verification email shortly."))
|
||||
else:
|
||||
form.set_html('.status', _('your email has been updated'))
|
||||
|
||||
|
||||
# user is removing their email
|
||||
if (not email and c.user.email and
|
||||
form.has_errors("email", errors.NO_EMAILS)):
|
||||
c.user.email = ''
|
||||
c.user.email_verified = None
|
||||
c.user._commit()
|
||||
Award.take_away("verified_email", c.user)
|
||||
updated = True
|
||||
form.set_html('.status', _('your email has been updated'))
|
||||
|
||||
# change password
|
||||
if (password and
|
||||
not (form.has_errors("newpass", errors.BAD_PASSWORD) or
|
||||
|
||||
Reference in New Issue
Block a user