make authentication methods more readable (thanks @fsmanuel)
This commit is contained in:
parent
f7a0103553
commit
ce3b89c910
1 changed files with 2 additions and 2 deletions
|
@ -149,8 +149,8 @@ class User < ActiveRecord::Base
|
|||
self.groups.find(:all, :conditions => {:type => ""})
|
||||
end
|
||||
|
||||
def self.authenticate(nick, password)
|
||||
user = (find_by_nick(nick) or find_by_email(nick))
|
||||
def self.authenticate(login, password)
|
||||
user = (find_by_nick(login) or find_by_email(login))
|
||||
if user && user.has_password(password)
|
||||
user
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue