[pmwiki-users] Odd Auth behavior

Petko Yotov 5ko at 5ko.fr
Sat Jun 20 05:52:45 CDT 2009

On Saturday 20 June 2009 08:27:46 Jim Beuerle wrote:
> Suppose PageTextVar('Main.HomePage','wikititle');  is placed BEFORE
> include_once("$FarmD/scripts/authuser.php"); in config.php.  When I login
> as an admin, the admin level of authorization is not recognized in the
> group Main, but is recognized in all other groups.
> This can be easily remedied by placing the
> PageTextVar('Main.HomePage','wikititle'); AFTER
> include_once("$FarmD/scripts/authuser.php");

Hello. For performance reasons, PmWiki caches some group and page 
authorization levels when a page is accessed. For this reason, it is better 
to include authuser.php quite early in config.php, notably
* after any recipe which inserts some custom writable PageStore class (MySQL, 
SQLite, Compressed PageStore or other)
* and after any internationalization (UTF-8 and XLPage).

(If you don't use a custom PageStore class and i18n, include authuser.php 
first thing in config.php.)

All other recipes should be included after these.

Any direct function call in config.php, like ResolvePageName(), PageTextVar(), 
PageVar(), RetrieveAuthPage(), or others, if possible, should be done near 
the end of config.php.

This is the general advice, recipe authors may give you different instructions 
where needed.


More information about the pmwiki-users mailing list