change to params[uid]
add attr_accessor :uid to the user model
uncomment filter