CodeIgniter Forums
IDEA: Centralized userId - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: IDEA: Centralized userId (/showthread.php?tid=73257)

Pages: 1 2


RE: IDEA: Centralized userId - InsiteFX - 10-17-2019

It's very easy to add on AdminLTE as a CodeIgniter 4 Module I have already done it.


RE: IDEA: Centralized userId - mmx - 01-29-2020

(04-05-2019, 06:37 PM)MGatner Wrote: I believe you are making my point for me. While that solution definitely works, it still requires either a) every authentication library to implement the same method/property/export/etc, or b) my library to guess or be configurable to know how to get that info from the selected authentication solution. For CodeIgniter to have a central, standardized location to get/set this still puts none of the burden on the framework for determining the info, but provides a consistent and reliable way for developers to pass the info between each other in the absence of external standards.

As I recall and long ago, Rick Ellis and the user base argued that there were many ways of authenticating and authorizing users and the framework should not favor any particular method. This was long before interfaces were in common use within PHP MVC frameworks. If you think of an interface as a way of establishing rules for interfacing extensions to the framework, then a wider use of interfaces for CI4 might be a consideration. Thus the framework could handle user_id persistence and any number of auth extensions could implement the interface.