Community Auth - Use to selectivly display content on page |
Hi all,
thanks for this nice plugin, i had some trouble setting it up but reading helped me big time. One thing i could not achieve though was content on a page depending on a role. i tried using PHP Code: <?php but this leads to the error: Fatal error: Call to undefined method MY_Loader::require_role() in ... Which i think is because i am calling this from a .php page and not a Controller. How would i implement such a thing? Thanks a lot. x (11-27-2018, 02:56 AM)xBarns Wrote: Hi all, I think i found the answer, in some other thread: PHP Code: if( isset( $auth_level ) && $auth_level >= 10 should do it, still need to verify first though.
Depends if you are in a view, controller, model... see https://community-auth.com/documentation...-variables
(11-27-2018, 11:23 AM)skunkbad Wrote: Depends if you are in a view, controller, model... see https://community-auth.com/documentation...-variables Thank you very much! |
Welcome Guest, Not a member yet? Register Sign In |