<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,12 +9,11 @@ TODO:
   - add a config method that you pass a hash for configuring it's behavior
     - secret signup urls
     - account activation through email
+
   - ?implement a session store which isn't cookie based
   - turn on sessions unless they're already on
     - randomize the session key on every installation?
   - clean up adapters
-    - IMPORTANT make tc adaptor use a numeric PK instead of the users email.
-      - this matters allot because otherwise it becomes very complicated to add different authentication backends like facebook connect.
     - write simple attribute declaration method for TcUser
     - condense the adapters down to the simplest solution that could possibly work
       - right now it's like I have two seperate goals, both which are important
@@ -24,10 +23,10 @@ TODO:
         maybe make the adapter class called UserAdapter, and then TkUser and DmUser become User. All my controller method calls go to UserAdapter
         but then for people wanting to talk to the model, they just use User, since they aren't dealing with multiple backends and thus don't need
         a creepy adapter.
-        If I define the attributes I'm specifically going to use in the adapter, I don't need to do so much method missing crap.
+
   - make site admin work the same for dm and tc, because I like how permission == -2 is site admin, then you could set a user as site admin instead of it being limited to the first user created
     and they wouldn't be deletable.
-    or maybe I just make a heirarchy for that so users with lower permissions can't delete users with higher, or at all?.
+    or maybe I just make a heirarchy for that so users with lower permissions can't delete users with higher.
       just remember, this is supposed to be a simple authentication solution
 
 
@@ -37,8 +36,8 @@ TODO:
       - add virtual attribute declaration
       - add validations
       - remove the object syntax method_missing? and stick to hash accessors?
-      - or rather then use method missing, dynamically create class methods based in the contents of the hash
-      - or create a validator tool for hashes.
+      - or rather then use method missing, dynamically create class methods based in the contents of the hash?
+      - or create a validator tool for hashes. hash.valid?
     - change User to AbstractUser and DmUser and TcUser to User
 
   - add error messages for failed logins and stuff</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,6 @@ class User
     include TcAdapter
   end
 
-  alias :class_id :id
-
   def initialize(interfacing_class_instance)
     @instance = interfacing_class_instance
   end</diff>
      <filename>lib/models/abstract_user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,11 @@ module DmAdapter
     end
 
     def get(hash)
-      self.new DmUser.first(hash)
+      if user = DmUser.first(hash)
+        self.new user
+      else
+        nil
+      end
     end
 
     def set(attributes)
@@ -33,7 +37,7 @@ module DmAdapter
     end
 
     def method_missing(meth, *args, &amp;block)
-      #cool I just found out * on an array turn the array into a list of args for a function
+      #cool I just found out * on an array turns the array into a list of args for a function
       @instance.send(meth, *args, &amp;block)
     end
   end</diff>
      <filename>lib/models/dm_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,10 @@
 module TcAdapter
   def self.included(base)
     base.extend ClassMethods
-    base.class_eval { include TcAdapter::InstanceMethods }
+    base.class_eval {
+      include TcAdapter::InstanceMethods
+      alias :class_id :id
+    }
   end
 
   module ClassMethods</diff>
      <filename>lib/models/tc_adapter.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7222f927319a2904a25e85d2b7c4de0ad3ff61b3</id>
    </parent>
  </parents>
  <author>
    <name>Max</name>
    <email>max@gregory.(none)</email>
  </author>
  <url>http://github.com/maxjustus/sinatra-authentication/commit/35eb3d80d22224dc7b0edae6e418b700436ade1b</url>
  <id>35eb3d80d22224dc7b0edae6e418b700436ade1b</id>
  <committed-date>2009-07-15T14:08:14-07:00</committed-date>
  <authored-date>2009-07-15T14:08:14-07:00</authored-date>
  <message>fixed datamapper login failure for user that doesn't exist</message>
  <tree>0e4f282b43a3ff592f041c149a77e0a3f338c0a1</tree>
  <committer>
    <name>Max</name>
    <email>max@gregory.(none)</email>
  </committer>
</commit>
