<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/shared/_personal_details.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -43,8 +43,10 @@ class PeopleController &lt; ApplicationController
     @person = Person.new(params[:person])
     respond_to do |format|
       @person.email_verified = false if global_prefs.email_verifications?
+      @person.identity_url = session[:verified_identity_url]
       @person.save
       if @person.errors.empty?
+        session[:verified_identity_url] = nil
         if global_prefs.email_verifications?
           @person.email_verifications.create
           flash[:notice] = %(Thanks for signing up! Check your email
@@ -57,7 +59,12 @@ class PeopleController &lt; ApplicationController
         end
       else
         @body = &quot;register single-col&quot;
-        format.html { render :action =&gt; 'new' }
+        format.html { if @person.identity_url.blank? 
+                        render :action =&gt; 'new'
+                      else
+                        render :partial =&gt; &quot;shared/personal_details.html.erb&quot;, :object =&gt; @person, :layout =&gt; 'application'
+                      end
+                    }
       end
     end
   rescue ActiveRecord::StatementInvalid</diff>
      <filename>app/controllers/people_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,29 +17,45 @@ class SessionsController &lt; ApplicationController
 
   def open_id_authentication(openid_url)
     authenticate_with_open_id(openid_url, :required =&gt; [:nickname, :email]) do |result, identity_url, registration|
-      if result.successful?
+      if !result.successful?
+        failed_login result.message
+      else
         @person = Person.find_or_initialize_by_identity_url(identity_url)
         if @person.new_record?
+          @person.email_verified = false if global_prefs.email_verifications?
           @person.name = registration['nickname']
           @person.email = registration['email']
-          # XXX for now, don't mess with email verification for openid guys
-          @person.email_verified = true if global_prefs.email_verifications?
+
           @person.save
           if !@person.errors.empty?
             err_message = &quot;The following problems exist with your OpenID profile:&lt;br&gt;&quot;
-            @person.errors.each do |attr,val| 
-              logger.warn &quot;XXX #{attr}:#{val}&quot;
-              err_message +=  &quot;#{attr}: #{val}&lt;br&gt;&quot; 
+            @person.errors.each do |attr,val|
+              logger.warn &quot;open_id_authentication() Error: #{attr}:#{val}&quot;
+              err_message += &quot;#{attr}: #{val}&lt;br&gt;&quot;
             end
-
-            failed_login err_message.chop
-            return
+ 
+            flash[:error] = err_message.chop
+            @body = &quot;login single-col&quot;
+            session[:verified_identity_url] = identity_url
+            render :partial =&gt; &quot;shared/personal_details.html.erb&quot;, :object =&gt; @person, :layout =&gt; 'application'
+          elsif global_prefs.email_verifications?
+            @person.email_verifications.create
+            flash[:notice] = %(Thanks for signing up! Check your email
+                               to activate your account.)
+            redirect_to(home_url)
+          else
+            successful_login(&quot;Thanks for signing up!&quot;)
           end
+
+          return
+        end # if new record
+
+        if @person.deactivated?
+          flash[:error] = &quot;Your account has been deactivated&quot;
+          redirect_to home_url and return
         end
-        self.current_person = @person
+
         successful_login
-      else
-        failed_login result.message
       end
     end
   end
@@ -50,13 +66,14 @@ class SessionsController &lt; ApplicationController
     render :action =&gt; 'new'
   end
   
-  def successful_login
+  def successful_login(message = &quot;Logged in successfully&quot;)
+    self.current_person = @person
     if params[:remember_me] == &quot;1&quot;
       self.current_person.remember_me
       cookies[:auth_token] = { :value =&gt; self.current_person.remember_token , :expires =&gt; self.current_person.remember_token_expires_at }
     end
     redirect_back_or_default('/')
-    flash[:notice] = &quot;Logged in successfully&quot;
+    flash[:notice] = message
   end
 
   def password_authentication(login, password)</diff>
      <filename>app/controllers/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,6 +101,7 @@ class Person &lt; ActiveRecord::Base
                             :with =&gt; EMAIL_REGEX,
                             :message =&gt; &quot;must be a valid email address&quot;
   validates_uniqueness_of   :email
+  validates_uniqueness_of   :identity_url, :allow_nil =&gt; true
 
   before_create :create_blog
   before_save :encrypt_password
@@ -391,7 +392,6 @@ class Person &lt; ActiveRecord::Base
     end
 
     def log_activity_description_changed
-      debugger
       unless @old_description == description or description.blank?
         add_activities(:item =&gt; self, :person =&gt; self)
       end</diff>
      <filename>app/models/person.rb</filename>
    </modified>
    <modified>
      <diff>@@ -77,6 +77,6 @@
         &lt;div&gt;&lt;%= render :partial =&gt; 'shared/debug' %&gt;&lt;/div&gt;
       &lt;%- end -%&gt; 
     &lt;/div&gt;
-  &lt;%= global_prefs.analytics %&gt;
+    &lt;%= global_prefs.analytics %&gt;
   &lt;/body&gt;
 &lt;/html&gt;</diff>
      <filename>app/views/layouts/application.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7d06a62e163ec11b832445b9f1946a6256da3c86</id>
    </parent>
  </parents>
  <author>
    <name>Tom Brown</name>
    <email>herestomwiththeweather@gmail.com</email>
  </author>
  <url>http://github.com/herestomwiththeweather/insoshi/commit/1652833b0b0246832cd4da27573242f73a73ae17</url>
  <id>1652833b0b0246832cd4da27573242f73a73ae17</id>
  <committed-date>2008-09-10T01:18:56-07:00</committed-date>
  <authored-date>2008-09-10T01:18:56-07:00</authored-date>
  <message>allow openid registration to recover from validation errors from simple registration info</message>
  <tree>92d0c9e070247b958ed0ead33ef71a21f4d339ee</tree>
  <committer>
    <name>Tom Brown</name>
    <email>herestomwiththeweather@gmail.com</email>
  </committer>
</commit>
