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