[pmwiki-users] Find out users authorization in PHP when loading page

Thomas Lundgren publik at lundgren.nu
Mon Feb 20 18:08:48 CST 2012

Simple as that. :)


Exactly what I hoped for and guessed should be there somewhere... :)

And a very fast answer as always!

Helped a lot!

Best regards,

Patrick R. Michaud skrev 2012-02-21 00:47:
> On Tue, Feb 21, 2012 at 12:04:48AM +0100, Thomas Lundgren wrote:
>> Help! :)
>> I´m trying to find a way to (in PHP) check if the user that makes
>> PmWiki load a page are authorized to edit that particular page.
> The CondAuth() function does what you want:
>      if (CondAuth($pagename, 'edit')) { ... }
> You can provide either authorization levels ('read', 'edit',
> 'attr', 'admin') or action names ('browse', 'upload', 'source')
> as the second argument to CondAuth().
> Hope this helps,
> Pm

More information about the pmwiki-users mailing list