From 4b9b02785030c2846d90756ac211c24fd5d5288c Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 31 May 2022 14:54:08 +0100 Subject: [PATCH] Don't clear the password for deactivated user --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ed27befa7..c849cda13 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -43,7 +43,7 @@ class UsersController < ApplicationController else case user_params[:active] when "false" - @user.update!(confirmed_at: nil, sign_in_count: 0, encrypted_password: "") + @user.update!(confirmed_at: nil, sign_in_count: 0) flash[:notice] = I18n.t("devise.activation.deactivated", user_name: @user.name.possessive) when "true" @user.send_confirmation_instructions