Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3425102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:33:14+00:00 2026-05-18T06:33:14+00:00

I had the official authlogic plugin running perfectly on Rails 2.3.5. I converted my

  • 0

I had the official authlogic plugin running perfectly on Rails 2.3.5. I converted my application to Rails 3.0.1 and now I’m having some problems.

I’ve included the following authlogic gem in my gemfile
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'

When a user logs in, the session is saved. When calling that user session, the returned value is nil. UserSession.find returns a nil value so I’m not able to assign a current_user.

sessions_controller.rb

  def create
   @user_session = UserSession.new(params[:user_session])
   if @user_session.save!
    flash[:notice] = 'Login successful'
    redirect_to root_url
   else
    render :action => 'new'
 end
  end

application_controller.rb

 helper_method :current_user, :current_user_session

 private

  def current_user_session
    return @current_user_session if defined?(@current_user_session)
    @current_user_session = UserSession.find
  end

  def current_user
    return @current_user if defined?(@current_user)
    @current_user = current_user_session && current_user_session.record
  end

When a user logs in, the flash notice is returned with 'Login sucessful' but the current_user isn’t set. I’ve also tried this with the official authlogic plugin and nothing changed. Am I missing something here?

Thanks!

Tim

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:33:15+00:00Added an answer on May 18, 2026 at 6:33 am

    I had this exact problem. For some reason it was interfering with basic auth – to fix it I set allow_http_basic_auth to false.

    class UserSession < Authlogic::Session::Base
    
      allow_http_basic_auth false
    
    end 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Had this working; at one stage. The problem is the following text is now
Now that ASP.NET MVC has had its official release, should I be looking into
Had a problem with the recursive conflictCheck() method. That seems fine now. I have
I had a Navigation Controller based application and decided to use tab bars. And
I had been asked to build crystal reports for an application, i used the
I have spent some hours looking for a Rails3 dojo-toolkit UJS-driver but I had
I installed RVM from scratch following the installation guide on the official website. I
I've done several WPF application(not using MVVM) in the past and I had always
I followed the official docs on https setup located here: https://help.ubuntu.com/6.06/ubuntu/serverguide/C/httpd.html#https-configuration I had to
I'm starting with CakePHP and I am following the blog tutorial from the official

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.