Authentication

CodeIgniter intentionally does not provide an internal authentication or authorization class. There are a numberof great third-party modules that provide these services, as well as resources in the community for writingyour own. The following are recommended guidelines to encourage consistency among developers ofmodules, projects, and the framework itself.

Recommendations

  • Modules that handle login and logout operations should trigger the login and logout Events when successful
  • Modules that define a “current user” should define the function user_id() to return the user’s unique identifier, or null for “no current user”