projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50bf6b4
)
Only set pending users to active on a password reset
author
Tom Hughes
<tom@compton.nu>
Sun, 9 May 2010 07:44:17 +0000
(08:44 +0100)
committer
Tom Hughes
<tom@compton.nu>
Sun, 9 May 2010 07:44:17 +0000
(08:44 +0100)
When resetting a password only activate pending users, otherwise a
confirmed user's account gets set back to active and may then get
suspended by the spam scorer.
app/controllers/user_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/user_controller.rb
b/app/controllers/user_controller.rb
index 222840a0610a60ed1117594c65e746eca7742ef5..42a50582e9831690dc66a6e21fb50e2c605e11d7 100644
(file)
--- a/
app/controllers/user_controller.rb
+++ b/
app/controllers/user_controller.rb
@@
-129,7
+129,7
@@
class UserController < ApplicationController
if params[:user]
@user.pass_crypt = params[:user][:pass_crypt]
@user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
- @user.status = "active"
+ @user.status = "active"
if @user.status == "pending"
@user.email_valid = true
if @user.save