- Moderated by:
- Support
-
- rank:
-
Professional
- registered:
- April 2004
- Status:
- offline
- last visit:
- 21.01.08
- Posts:
- 2723
I've got the pnuser.php displaying words/definitions for my upcoming dictionary module, and what I'd like to do is have it so that if the viewer has admin status, they can have extra controls (edit/remove) displayed with each entry...so, I've used the following check for access, but it doesn't work. I've verified my access level and it's admin, so I was wondering if maybe I couldn't use an ACCESS_ADMIN check in pnuser.php, being a user file.
Code
if (!pnSecAuthAction(0, 'AlarDictionary::', '::', ACCESS_ADMIN))
{
// Outout links for edit/remove here
}
I've also verified that the output of the admin links works by commenting out the check and seeing the links magically appear on page-refresh.
Any thoughts on this?
Thanks,
alar
--
Photography | PHP | Other -
- rank:
-
Professional
- registered:
- April 2004
- Status:
- offline
- last visit:
- 21.01.08
- Posts:
- 2723
If it's any help, I'm using a pnModURL as such to print the link...
Code
$output->URL(pnVarPrepForDisplay(pnModURL('ModName','admin','edit',array('tid'=>$match['startnum']))),_EDIT);
--
Photography | PHP | Other -
- rank:
-
Professional
- registered:
- April 2004
- Status:
- offline
- last visit:
- 21.01.08
- Posts:
- 2723
-
- rank:
-
Professional
- registered:
- April 2004
- Status:
- offline
- last visit:
- 21.01.08
- Posts:
- 2723
-
- rank:
-
Helper
- registered:
- November 2004
- Status:
- offline
- last visit:
- 12.03.07
- Posts:
- 387
You're welcome! :)
I tend to make mistakes like that, especially when I'm copying and pasting code where I know what it does, but not why necessarily. And then there are the silly little typos. If I had a dime for every time I forgot a semicolon.... :)
