Advertisement
Guest User

Untitled

a guest
Jun 1st, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.20 KB | None | 0 0
  1.   def self.authenticate(hash)
  2.     mail, pass = hash['mail'], hash['password']
  3.  
  4.     if user = Player.get(:mail => mail)
  5.       return user unless pass
  6.       user if user.authenticated?(pass)
  7.     end
  8.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement