Welcome Guest, Not a member yet? Register   Sign In
Community Auth scope: need access when building page header
#1

I have successfully adapted Community Auth to use my forms.  Now I'm trying to access the auth functions and variables from a library class that builds my page for me so I can customize the header based on user and permissions.  Currently I am autoloading that class...

How can I load the class in such a way as to provide access to the auth resources?
Reply
#2

i might need to know more. You are obviously routing to a controller, because that's just how CI works. It's always in the controller where you use the Auth functions. If the library is autoloaded, it can access the Auth variables through config. If you are attempting to do something in the class constructor of the library, I don't see how that would be reliable, but if you can explain your logic, maybe I can help.
Reply
#3

(This post was last modified: 03-12-2017, 05:56 PM by imstarboard.)

(03-12-2017, 03:25 PM)skunkbad Wrote: i might need to know more. You are obviously routing to a controller, because that's just how CI works. It's always in the controller where you use the Auth functions. If the library is autoloaded, it can access the Auth variables through config. If you are attempting to do something in the class constructor of the library, I don't see how that would be reliable, but if you can explain your logic, maybe I can help.


>> SOLVED:

Thanks, I can reference auth through config like you said. I was spelling the field incorrectly.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB