<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,7 @@ class User &lt; Sequel::Model
     boolean :active,            :default =&gt; true
     boolean :is_admin,          :default =&gt; false
     boolean :can_send_messages, :default =&gt; true
+    boolean :tos,               :default =&gt; false
 
     varchar :email_verification, :size =&gt; 255
     boolean :email_verified
@@ -35,7 +36,7 @@ class User &lt; Sequel::Model
   validations.clear
   validates do
     uniqueness_of :login
-    format_of :login, :with =&gt; /\A[\w.]+\z/
+    format_of :login, :with =&gt; /\A[\w. ]+\z/
     length_of :login, :within =&gt; 3..255
 
     confirmation_of :password
@@ -76,12 +77,22 @@ class User &lt; Sequel::Model
   end
 
   def self.prepare(hash)
-    user = new(hash)
-    user.email = hash['email']
-    user.password = hash['password']
-    user.password_confirmation = hash['password_confirmation']
+    login, openid, email, password, password_confirmation =
+      hash.values_at(*%w[login openid email password password_confirmation])
+
+    user = new(:login =&gt; login, :email =&gt; email, :password =&gt; password,
+               :password_confirmation =&gt; password_confirmation)
     user.salt = Digest::SHA1.hexdigest(&quot;--#{Time.now.to_f}--#{user.login}--&quot;)
     user
+
+#    clean_hash = hash.
+#    user = new(hash)
+#    #user = new
+#    user.email = hash['email']
+#    user.password = hash['password']
+#    user.password_confirmation = hash['password_confirmation']
+#    user.salt = Digest::SHA1.hexdigest(&quot;--#{Time.now.to_f}--#{user.login}--&quot;)
+#    user
   end
 
   def self.authenticate(hash)</diff>
      <filename>model/user.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>db12e44d25c2b7f25d3c34896d7d498a3938c483</id>
    </parent>
  </parents>
  <author>
    <name>Kristan &quot;Krispy&quot; Uccello</name>
    <email>kuccello@gmail.com</email>
  </author>
  <url>http://github.com/manveru/sociar/commit/574be38ecc7fc61aeed189ef167a5f30d487d599</url>
  <id>574be38ecc7fc61aeed189ef167a5f30d487d599</id>
  <committed-date>2009-03-12T20:08:11-07:00</committed-date>
  <authored-date>2009-03-12T19:41:20-07:00</authored-date>
  <message>-- Modified the user model to handle new hash filtering</message>
  <tree>4eb656c651d4359e87fb6c6d37cab8e1844a6ad6</tree>
  <committer>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </committer>
</commit>
