From 062e654d4502ff53a340c5f631cfe0ddd5810f19 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 14 Dec 2023 11:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E9=A1=BB=E9=AA=8C=E8=AF=81=E4=B8=A4=E6=AC=A1?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/accounts_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 4cec1be47..c7f4c2767 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -214,6 +214,7 @@ class AccountsController < ApplicationController end def change_password + return render_error("两次输入的密码不正确") if params[:password].to_s != params[:new_password_repeat].to_s @user = User.find_by(login: params[:login]) return render_error("未找到相关用户!") if @user.blank? return render_error("旧密码不正确") unless @user.check_password?(params[:old_password])