#58 ✓resolved
divineforest

Can't create new user due to "not confirmed" error

Reported by divineforest | March 23rd, 2009 @ 07:01 AM

authlogic 2.0.0 rails 2.3.2

When I try to create a new user with this controller action:


  def create
    @user = User.new(params[:user])
    @user.email_confirmed = false
        
    if @user.save      
      @user.deliver_email_confirmation_instructions      
      redirect_to new_user_session_url
    else
      render :action => :new
    end
  end

I get the following error: Authlogic::Session::Existence::SessionInvalidError in MerchantsController#create

Your session is invalid and has the following errors: Your account is not confirmed

The trace is: /Users/divineforest/Sites/mmanager/vendor/plugins/authlogic/lib/authlogic/session/existence.rb:83:in save!' /Users/divineforest/Sites/mmanager/vendor/plugins/authlogic/lib/authlogic/session/existence.rb:36:increate!' /Users/divineforest/Sites/mmanager/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb:101:in create_session' /Users/divineforest/Sites/mmanager/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb:91:inmaintain_sessions' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in send' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:inevaluate_method' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in call' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:93:inrun' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in each' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:insend' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in run' /Users/divineforest/Sites/mmanager/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:inrun_callbacks' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/callbacks.rb:344:in callback' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/callbacks.rb:249:increate_or_update' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/base.rb:2539:in save_without_validation' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/validations.rb:1009:insave_without_dirty' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/dirty.rb:79:in save_without_transactions' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:229:insend' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:229:in with_transaction_returning_status' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:intransaction' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in transaction' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:228:inwith_transaction_returning_status' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in save' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:208:inrollback_active_record_state!' /Users/divineforest/Sites/mmanager/vendor/rails/activerecord/lib/active_record/transactions.rb:196:in save' /Users/divineforest/Sites/mmanager/app/controllers/merchants_controller.rb:13:increate'

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

Pages