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 9084193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:56:38+00:00 2026-06-16T20:56:38+00:00

This is about the Codeigniter application. I’m having a hard to understanding the benefit(s)

  • 0

This is about the Codeigniter application. I’m having a hard to understanding the benefit(s) to creating an auth library for all authentication tasks as opposed to creating individual controllers that holds their specific tasks.

Can anyone care to explain?

  • 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-06-16T20:56:39+00:00Added an answer on June 16, 2026 at 8:56 pm

    Libraries make code reuse possible. You abstract out the functionality for the authentication tasks and then you can load and use those in any of your controllers, methods, models, etc.

    UPDATE

    Controllers (in CodeIgniter) just respond to a request and the libraries are the workhorses. For example, in the auth library, the controller may have a method called login. This method doesn’t actually log the user in. Instead, it checks to see if there are any $_POST variables available. If the user has yet to enter username/password, then the $_POST array will be empty. The controller will then call a login view that will display the login form to the user. The user will then enter username/password and submit that form back to the login method of the auth controller.

    Since there are now $_POST variables, the auth controller will then call the auth library (probably a method like check_auth_credentials and try to log in the user.

    Basically, the controllers “control” the request. They determine what to do based on what the request is and what is being sent with the request. Libraries, in contrast, are a set of related methods that manage a set of tasks. The controllers are what the USER interacts with and the libraries are what the CONTROLLERS interact with.

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

Sidebar

Related Questions

This is about asp.net mvc3 web application. We have used Object cache to store
Been thinking about this for hours now. Im building a simple slideshow application, where
I'm rather new to Codeigniter, so I may be going about this the wrong
I found this thread on StackOverflow about how to get the Application Root from
Concerning this post, I'd like to add css,images and js to my codeigniter application.
In my LAMP application (using CodeIgniter), I have a call to $this->db->update... that generates
I'm having trouble making a connection to Amazons RDS service from my Codeigniter application.
I'm trying to build an authentication system in my application, but I'm having some
This project is literally making me lose sleep. I think about it all day
I'm about to start developing a new web application in CodeIgniter. In the past,

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.