mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Prevent _banned users from resetting their password.
This commit is contained in:
committed by
Ricky Ramirez
parent
53d358bc61
commit
eeb32ec12a
@@ -2263,6 +2263,10 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
form.redirect('/password?expired=true')
|
||||
return
|
||||
|
||||
# Prevent banned users from resetting, and thereby logging in
|
||||
if user._banned:
|
||||
return
|
||||
|
||||
# successfully entered user name and valid new password
|
||||
change_password(user, password)
|
||||
g.log.warning("%s did a password reset for %s via %s",
|
||||
|
||||
Reference in New Issue
Block a user