[pmwiki-users] authuser & SetTmplDisplay
noskule
noskule at gmx.net
Tue Feb 21 11:07:37 CST 2006
/hi list
I try to hide parts of the content in relation to userrights. The skinsection /
/<!--PageCmdsFmt--> should only be visible if the user has edit rights.//
So I made the following configuration:
## Auth User Test (config.php)/
$AuthUser['Guest'] = crypt('test');
$AuthUser['Editor'] = crypt('test');
$AuthUser['Admin'] = crypt('test');
$DefaultPasswords['admin'] = 'id:Admin';
$DefaultPasswords['edit'] = 'id:Editor';
$DefaultPasswords['read'] = 'id:Guest';
include_once('scripts/authuser.php');
$page = RetrieveAuthPage($pagename, 'read', *false*, READPAGE_CURRENT);
if (!@$page['=auth']['read']) SetTmplDisplay('PageCmdsFmt', 0);
/
## skin.tmpl
<!--PageCmdsFmt-->/
PageCmdsBFmtPageCmdsBFmtPage
/<!--/PageCmdsFmt-->/
authuser works correct. But the PageCmdsFmt content is allways visible.
What I'm doing wrong here? And secound question: Is this also susposed
to work with the userauth cookbook script?
grz nos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060221/74aeb4e9/attachment.html
More information about the pmwiki-users
mailing list