Authentication
CodeIgniter intentionally does not provide an internal authentication or authorization class. There are a number of great third-party modules that provide these services, as well as resources in the community for writing your own. The following are recommended guidelines to encourage consistency among developers of modules, projects, and the framework itself.
Recommendations
- Modules that handle login and logout operations should trigger the
login
andlogout
Events when successful - Modules that define a “current user” should define the function
user_id()
to return the user’s unique identifier, ornull
for “no current user”
© 2014–2020 British Columbia Institute of Technology
Licensed under the MIT License.
https://codeigniter.com/userguide4/extending/authentication.html