From 00c614cd462594cbb4dd9a47ec9793fc0b46f67e Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 29 Jul 2019 16:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 91cfa8ac..63389709 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -3012,7 +3012,7 @@ end if index == 0 school_id = list[0] elsif index == 1 - prefix = list[0] + prefix = list[0].to_s.strip elsif index != 2 && list[3] && [0, 1, 2].include?(list[3].to_i) if list[3].to_i == 1 user = User.find_by_sql("SELECT u.* FROM `users` u, `user_extensions` ue where u.id = ue.user_id and ue.identity = 1 and ue.student_id = '#{list[0]}' and ue.school_id= #{school_id.to_i}").first @@ -3026,7 +3026,7 @@ end user = User.new user.admin = false user.activate - user.login = prefix + list[0] + user.login = prefix + list[0].to_s.strip user.lastname = list[1] user.nickname = list[1] user.professional_certification = 1