[pmwiki-users] identify current authorization level
Patrick R. Michaud
pmichaud at pobox.com
Thu Jul 20 16:43:21 CDT 2006
On Thu, Jul 20, 2006 at 03:26:40PM -0400, Henrik Bechmann wrote:
> How do I determine in PHP code if the current user has edit
> authorization (I don't use UserAuth or AuthUser, just the out-of-the-box
> password protection.).
In PHP code (i.e., config.php), one can do:
$pagename = ResolvePageName($pagename);
$editauth = (boolean)RetrieveAuthPage($pagename, 'edit', false, READPAGE_CURRENT);
$editauth will be true if the visitor is authorized to edit
the current page.
Pm
More information about the pmwiki-users
mailing list