Recent Changes - Search:

PmWiki

pmwiki.org

CondAuth

Check whether the user requesting a page has specific authorizations, for example editing, browsing.

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().

When using CondAuth() or other similar functions it's important to remember to place them as late as possible in your config.php to avoid various caching issues which can be very difficult to troubleshoot otherwise. CondAuth causes the cache(s) to be populated, which may cause problems by code further down expecting unpopulated caches.

This page may have a more recent version on pmwiki.org: PmWiki:CondAuth, and a talk page: PmWiki:CondAuth-Talk?.

Edit - History - Print - Recent Changes - Search
Page last modified on December 10, 2012, at 02:39 AM