From: Tom Hughes Date: Sun, 9 May 2010 07:44:17 +0000 (+0100) Subject: Only set pending users to active on a password reset X-Git-Tag: live~6338^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/7e5c998a87ef776276c8015c17cd9e7be79a1692 Only set pending users to active on a password reset 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. --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 222840a06..42a50582e 100644 --- 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