Merge branch 'master' of git://gitorious.org/~ruinar/selectricity/ruinar-selectricity
[selectricity] / app / models / user.rb
index 17fe702332970e51b7f1ecacb3e0627e70feb312..13588402064c996a69e018283ffa1dc5f4a63f61 100644 (file)
@@ -25,6 +25,10 @@ class User < ActiveRecord::Base
   def name
      [ firstname, lastname].join(" ")
   end
+  
+  def email=(new_email)
+    self[:email] = new_email
+  end
 
   # Authenticates a user by their login name and unencrypted password.  Returns the user or nil.
   def self.authenticate(login, password)
@@ -82,4 +86,5 @@ class User < ActiveRecord::Base
       errors.add(:login, "should not begin or end with spaces") if login and login.strip!
       errors.add(:login, "should contain only letters, numbers, and spaces") unless login =~ /^[A-Za-z0-9 ]*$/
     end
+    
 end

Benjamin Mako Hill || Want to submit a patch?