[pmwiki-users] How to set nopass in script

Allister Jenks arj at zkarj.co.nz
Sun Aug 27 05:58:56 CDT 2006


A while back, PM gave me the following solution to 'auto-launch'
sections of my site.

    $page = ReadPage('Issue1.GroupAttributes');
    if ($page['passwdread'] != '@Issue1') {
      $page['passwdread'] = '@Issue1';
      WritePage('Issue1.GroupAttributes', $page);
    }

Thus the first page request once the date rolled around would set the
read permissions appropriately to let people in.

Now I want to do something slightly different like this.

    $page2 = ReadPage('FreeStuff.GroupAttributes');
    if ($page['passwdread'] = '@lock') {
      $page['passwdread'] = 'nopass';
      WritePage('FreeStuff.GroupAttributes', $page);
    }

This to launch a new section which is currently set to @lock for read
permission.  The script removes the @lock and the setting shows on the
GroupAttributes attributes as **** but I still seem to need a password
to access the section.  What should I be putting where I have
'nopass'?

-- 
Allister




More information about the pmwiki-users mailing list