]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
bits
[rails.git] / app / models / user.rb
index cfcbfd351f439aa0e4db84c2fc6a7326466e89de..72752078e3aa441fec1f51b4bfa5a14bef41f8ba 100644 (file)
@@ -1,3 +1,22 @@
+require 'digest/md5'
+
 class User < ActiveRecord::Base
   has_many :traces
+
+  validates_confirmation_of :pass_crypt
+
+#  def password=(str) 
+#    write_attribute("pass_crypt", Digest::MD5.hexdigest(str)) 
+#  end 
+
+
+#  def password
+#    return self.pass_crypt
+#  end 
+
+#  def self.authenticate(username, passwd) 
+#    find_first([ "display_name = ? AND pass_crypt =?", 
+#               username, 
+#               Digest::MD5.hexdigest(passwd) ]) 
+#  end 
 end