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 => ""})
|
self.groups.find(:all, :conditions => {:type => ""})
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.authenticate(nick, password)
|
def self.authenticate(login, password)
|
||||||
user = (find_by_nick(nick) or find_by_email(nick))
|
user = (find_by_nick(login) or find_by_email(login))
|
||||||
if user && user.has_password(password)
|
if user && user.has_password(password)
|
||||||
user
|
user
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue