Apologies if this topic has already been answered, but a quick search yielded no solution.
Ref: Novice to Ninja
File: chapter9/includes/access.inc.php (pg.302)
Can someone please explain to me where the value for the argument ($role) comes from in this function.
I thought values needed to be passed into functions via arguments included in the function call.
I can't see where $role has been declared or even a value for it.
Thanks in advance
If you scroll down to page 305, you will find this:
if (!userHasRole('Account Administrator'))
$error = 'Only Account Administrators may access this page.';
There you can clearly see, it will be passed a value. In this particular use, the $role used in userHasRole will contain 'Account Administrator'
Thank You cpradio. Much appreciated. I was only looking in the access.php file.
Enjoy your day.
This topic is now closed. New replies are no longer allowed.