[pmwiki-users] Setting page privs from config.php

Hans design5 at softflow.co.uk
Thu Oct 1 09:49:19 CDT 2009


Thursday, October 1, 2009, 3:29:21 PM, DaveG wrote:

> Thanks -- I was looking for an exising function but didn't find one. 
> I'll take a look at setting the page attribute -- but might try to find
> another way around the problem instead.

something like this perhaps in a function:
say $pn is the pagename

   $page = RetrieveAuthPage($pn, 'edit', true);
   if (!$page) echo "?cannot edit $pagename";
   $new = $page;
   if (!$new['passwdedit']) {
      $new['passwdedit'] = crypt("password");
      UpdatePage($pn, $page, $new);
   }



  ~Hans




More information about the pmwiki-users mailing list