<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/20080622053008_change_state_default_to_be_active.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,4 +3,5 @@ h1. Todo
 * Style up UI
 * * Highlight if is my own status
 * Look into auto_tags
-* Statuses.xml
\ No newline at end of file
+* Statuses.xml
+* Remove login from users
\ No newline at end of file</diff>
      <filename>TODO.textile</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,6 @@
-class UsersController &lt; ApplicationController
-  # Be sure to include AuthenticationSystem in Application Controller instead
-  include AuthenticatedSystem
-  
+class UsersController &lt; ApplicationController  
   # Protect these actions behind an admin login
-  # before_filter :admin_required, :only =&gt; [:suspend, :unsuspend, :destroy, :purge]
+  before_filter :admin_required, :only =&gt; [:suspend, :unsuspend, :destroy, :purge]
   before_filter :find_user, :only =&gt; [:suspend, :unsuspend, :destroy, :purge]
   
 
@@ -15,8 +12,7 @@ class UsersController &lt; ApplicationController
   def create
     logout_keeping_session!
     @user = User.new(params[:user])
-    if @user &amp;&amp; @user.valid?
-      @user.register!
+    if @user.valid? &amp;&amp; @user.save!
       redirect_back_or_default('/')
       flash[:notice] = &quot;Thanks for signing up!  We're sending you an email with your activation code.&quot;
     else</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -44,17 +44,13 @@ class User &lt; ActiveRecord::Base
   validates_presence_of     :email
   validates_length_of       :email,    :within =&gt; 6..100 #r@a.wk
   validates_uniqueness_of   :email,    :case_sensitive =&gt; false
-  validates_format_of       :email,    :with =&gt; RE_EMAIL_OK, :message =&gt; MSG_EMAIL_BAD
-
-  
+  validates_format_of       :email,    :with =&gt; RE_EMAIL_OK, :message =&gt; MSG_EMAIL_BAD  
 
   # HACK HACK HACK -- how to do attr_accessible from here?
   # prevents a user from submitting a crafted form that bypasses activation
   # anything else you want your user to change should be added here.
   attr_accessible :login, :email, :name, :password, :password_confirmation
 
-
-
   # Authenticates a user by their login name and unencrypted password.  Returns the user or nil.
   #
   # uff.  this is really an authorization, not authentication routine.</diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,14 @@
 class UserMailer &lt; ActionMailer::Base
   def signup_notification(user)
     setup_email(user)
-    @subject    += 'Please activate your new account'
-  
-    @body[:url]  = &quot;http://YOURSITE/activate/#{user.activation_code}&quot;
-  
-  end
-  
-  def activation(user)
-    setup_email(user)
-    @subject    += 'Your account has been activated!'
-    @body[:url]  = &quot;http://YOURSITE/&quot;
+    @subject    += 'Thanks for signing up'
   end
   
   protected
     def setup_email(user)
       @recipients  = &quot;#{user.email}&quot;
       @from        = &quot;ADMINEMAIL&quot;
-      @subject     = &quot;[YOURSITE] &quot;
+      @subject     = &quot;[HOLLER] &quot;
       @sent_on     = Time.now
       @body[:user] = user
     end</diff>
      <filename>app/models/user_mailer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,3 @@ Your account has been created.
 
   Username: &lt;%=h @user.login %&gt;
   Password: &lt;%=h @user.password %&gt;
-
-Visit this url to activate your account:
-
-  &lt;%=h @url %&gt;</diff>
      <filename>app/views/user_mailer/signup_notification.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -11,17 +11,13 @@ describe UsersController do
   end
 
   
-  it 'signs up user in pending state' do
+  it 'signs up user in active state' do
     create_user
     assigns(:user).reload
-    assigns(:user).should be_pending
+    
+    assigns(:user).should be_active
   end
 
-  it 'signs up user with activation code' do
-    create_user
-    assigns(:user).reload
-    assigns(:user).activation_code.should_not be_nil
-  end
   it 'requires login on signup' do
     lambda do
       create_user(:login =&gt; nil)</diff>
      <filename>spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,16 +17,10 @@ describe User do
       @creating_user.should change(User, :count).by(1)
     end
 
-    it 'initializes #activation_code' do
+    it 'starts in active state' do
       @creating_user.call
       @user.reload
-      @user.activation_code.should_not be_nil
-    end
-
-    it 'starts in pending state' do
-      @creating_user.call
-      @user.reload
-      @user.should be_pending
+      @user.should be_active
     end
   end
 
@@ -226,12 +220,9 @@ describe User do
     users(:quentin).remember_token_expires_at.between?(before, after).should be_true
   end
 
-  it 'registers passive user' do
-    user = create_user(:password =&gt; nil, :password_confirmation =&gt; nil)
-    user.should be_passive
-    user.update_attributes(:password =&gt; 'new password', :password_confirmation =&gt; 'new password')
-    user.register!
-    user.should be_pending
+  it 'registers active user' do
+    user = create_user
+    user.should be_active
   end
 
   it 'suspends user' do
@@ -255,7 +246,7 @@ describe User do
 protected
   def create_user(options = {})
     record = User.new({ :login =&gt; 'quire', :email =&gt; 'quire@example.com', :password =&gt; 'quire69', :password_confirmation =&gt; 'quire69' }.merge(options))
-    record.register! if record.valid?
+    record.save
     record
   end
 end</diff>
      <filename>spec/models/user_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,17 +9,13 @@ module Authorization
       recipient.class_eval do
         include StatefulRolesInstanceMethods
         
-        acts_as_state_machine :initial =&gt; :pending
+        acts_as_state_machine :initial =&gt; :active
         state :passive
         state :pending, :enter =&gt; :make_activation_code
         state :active,  :enter =&gt; :do_activate
         state :suspended
         state :deleted, :enter =&gt; :do_delete
 
-        event :register do
-          transitions :from =&gt; :passive, :to =&gt; :pending, :guard =&gt; Proc.new {|u| !(u.crypted_password.blank? &amp;&amp; u.password.blank?) }
-        end
-        
         event :activate do
           transitions :from =&gt; :pending, :to =&gt; :active 
         end</diff>
      <filename>vendor/plugins/restfulauthentication/lib/authorization/stateful_roles.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c1664d1b1335dcde59443cf9962705bdb3ad280b</id>
    </parent>
  </parents>
  <author>
    <name>Zach Inglis</name>
    <email>zach@lt3media.com</email>
  </author>
  <url>http://github.com/zachinglis/holler/commit/8f243076cdd84144bf4b3eacf7b765ef0c65ae65</url>
  <id>8f243076cdd84144bf4b3eacf7b765ef0c65ae65</id>
  <committed-date>2008-06-21T22:45:31-07:00</committed-date>
  <authored-date>2008-06-21T22:45:31-07:00</authored-date>
  <message>Fixing up restful authentication the way i like it</message>
  <tree>8ea06a52b9eb99a25b6f6f052e7753528241a917</tree>
  <committer>
    <name>Zach Inglis</name>
    <email>zach@lt3media.com</email>
  </committer>
</commit>
