Refactor user.rb

[#71835198]