• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
(03-12-2017, 04: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.