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

  • Home
  • SEARCH
  • 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 5846565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:35:41+00:00 2026-05-22T12:35:41+00:00

I have authlogic working fine but now have the need to let administrator users

  • 0

I have authlogic working fine but now have the need to let administrator users come in and have different access.

So I created a migration adding administrator column to the Users table as string. However, I just can not seem to get the value of it out!!

see below my index action:

print "\n administrator" + User.find(current_user.id).administrator.to_s

the above line never prints anything when I know that this user HAS administrator string set to true in the db.

Below is the User model

class User < ActiveRecord::Base
  acts_as_authentic  {|config| 
    config.validates_uniqueness_of_email_field_options :scope => :id
  }
  belongs_to :another_class
end

what am I doing wrong here? All I want to do is get the administrator column value out. In the logs I can see the select users.* from users where id = 2 query being run!

is there another best way to manage admin roles with authlogic??

  • 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-22T12:35:42+00:00Added an answer on May 22, 2026 at 12:35 pm

    You’re likely better off using cancan for managing roles and permissions. It can be used in combination with authlogic.

    If you are going to just add a flag “administrator” field to the user record, it should work as long as your rules are simple, but would be better as a boolean rather than a string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have Authlogic working fine with this user_sessions/new view: <% form_for @user_session, :url
I currently use Authlogic in a web-app to handle user authentication, but have now
I have auto registration working with authlogic using gaizka's version of authlogic_openid which I
I am working on an app right now where I have Individuals, Athletes and
Everything seems to be working fine with my implementation of Facebooker with Authlogic (using
I have an existing site that is working well with Authlogic login. I'm trying
i have a input tag which is non editable, but some times i need
I have authlogic and openid working correctly, and am trying to integrate oauth for
I have a website that I am working on that has both an intranet
So I'm working with authlogic, and I'm trying to duplicate the login functionality to

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.