]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Runaway HTML in f28f28f24a61ce4a8956c220f04df5980d4dbd65 made all the interface BOLD
[rails.git] / app / models / user.rb
index 0b8b512ee3bab5becf3bc350fb916026bd51b5b0..09e1a7d35611a9c3178a4832a3b19845b5faf0fe 100644 (file)
@@ -22,6 +22,7 @@ class User < ActiveRecord::Base
   validates_confirmation_of :pass_crypt#, :message => ' must match the confirmation password'
   validates_uniqueness_of :display_name, :allow_nil => true
   validates_uniqueness_of :email
+  validates_uniqueness_of :openid_url, :allow_nil => true
   validates_length_of :pass_crypt, :within => 8..255
   validates_length_of :display_name, :within => 3..255, :allow_nil => true
   validates_email_format_of :email
@@ -85,7 +86,7 @@ class User < ActiveRecord::Base
   end
 
   def languages
-    attribute_present?(:languages) ? read_attribute(:languages).split(",") : []
+    attribute_present?(:languages) ? read_attribute(:languages).split(/ *, */) : []
   end
 
   def languages=(languages)