finished the first instance of broken auth and sess mgmt

This commit is contained in:
Ken Johnson
2013-05-23 20:06:24 -04:00
parent c71ef0ccfd
commit dbbb2ce651
4 changed files with 37 additions and 6 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ class User < ActiveRecord::Base
validates_uniqueness_of :email
validates_format_of :email, :with => /.+@.+\..+/i
def self.authenticate(email, password)
auth = nil
user = find_by_email(email)
@@ -23,6 +24,6 @@ class User < ActiveRecord::Base
raise "#{email} doesn't exist!"
end
return auth
end
end
end