mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 11:10:12 +01:00
Don't try to authenticate when the provided username is blank.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@656 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
d4f0344ec3
commit
9179dbd16e
1 changed files with 1 additions and 0 deletions
|
|
@ -105,6 +105,7 @@ class User < ActiveRecord::Base
|
|||
alias_method :prefs, :preference
|
||||
|
||||
def self.authenticate(login, pass)
|
||||
return nil if login.blank?
|
||||
candidate = find(:first, :conditions => ["login = ?", login])
|
||||
return nil if candidate.nil?
|
||||
if candidate.auth_type == 'database'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue