[pmwiki-users] passwords and farms

H. Fox haganfox at users.sourceforge.net
Thu Nov 16 16:49:00 CST 2006


On 11/16/06, Sandy <sandy at onebit.ca> wrote:
> I now have a multi-field farm. (Yay!!!) Most of the fields will be CMS
> use rather than wiki -- one admin, few writers, lots of readers.
>
> I am using AuthUser.
>
> For now, I want each field to have two users:
>
> Admin. Same person for field. Can do anything. This is set in
> farmconfig.php and works.
>
>         $AuthUser['Admin'] = 'xxxx';
>         include_once("$FarmD/scripts/authuser.php");
>         $DefaultPasswords['admin'] = 'id:Admin';
>         $DefaultPasswords['edit'] = 'id:Admin';
>         $DefaultPasswords['attr'] = 'id:Admin';
>         $DefaultPasswords['upload'] = 'id:Admin';
>         include_once("$FarmD/scripts/authuser.php");
>
> Writer. To be set for each wiki. My first thought was to put this in
> /local/config.php:
>
>         $AuthUser['Writer1'] = 'xxxx';
>         $DefaultPasswords['edit'] = 'id:Admin,Writer1';
>         $DefaultPasswords['upload'] = 'id:Admin,Writer1';
>
> That got two people working nicely on the old single-wiki site, version
> 2.1.11. But now only Admin can log in.

As you suspect, it's because this line

         include_once("$FarmD/scripts/authuser.php");

needs to come *after* the lines you put in config.php.

One approach (that I haven't tried) is to make these the last two
lines of your farmconfig.php file:

         include_once("local/config.php");
         include_once("$FarmD/scripts/authuser.php");

Another approach is just to move the line out of farmconfig.php and
into each wiki's config.php.

Hagan




More information about the pmwiki-users mailing list