(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.