Method: Cms::Authentication::Model::ClassMethods#authenticate
- Defined in:
- lib/cms/authentication/model.rb
#authenticate(login, password) ⇒ Object
20 21 22 23 |
# File 'lib/cms/authentication/model.rb', line 20 def authenticate(login, password) u = find_by_login(login) # need to get the salt u && u.authenticated?(password) && !u.expired? ? u : nil end |