更新账号问题

dev_aliyun
daiao 5 years ago
parent b5fc687e01
commit c139343038

@ -221,7 +221,9 @@ class ManagementsController < ApplicationController
@user.admin = params[:admin].to_i @user.admin = params[:admin].to_i
end end
@user.firstname = "" @user.firstname = ""
@user.mail = params[:mail].strip == "" ? nil : params[:mail] if params[:mail].present?
@user.mail = params[:mail].strip
end
@user.phone = params[:phone].strip == "" ? nil : params[:phone] @user.phone = params[:phone].strip == "" ? nil : params[:phone]
#@user.password = params[:new_password] #@user.password = params[:new_password]
# if params[:new_password].strip != "" && params[:new_password_confirmation].strip != "" # if params[:new_password].strip != "" && params[:new_password_confirmation].strip != ""

Loading…
Cancel
Save