[pmwiki-users] ZAPauth & PmWiki

Patrick R. Michaud pmichaud at pobox.com
Tue Oct 17 12:50:10 CDT 2006


On Tue, Oct 17, 2006 at 12:46:12PM -0400, The Editor wrote:
> Thanks again for the extra help.  A couple further questions...
> 
> On 10/17/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > On Tue, Oct 17, 2006 at 06:06:02AM -0400, The Editor wrote:
> > > Part 1: Restricting ZAP
> > > ...
> > A function being called via HandleActions has to have the form:
> >
> >     function ZAPengine($pagename, $auth='zap') { ... }
> 
> Is this also required if using
> 
> if(CondAuth($pagename, $ZAPauth[forms])) {

The two are unrelated.

> SDV($ZAPauth[login], "read");
> SDV($ZAPauth[admin], "admin");
> 
> $HandleActions['zap'] = 'ZAPengine';
> function ZAPengine($ZAPflag=0, $pagename, $auth='zap') {

This function definition is wrong.  As I said in my previous
post, any function being called via $HandleActions has to have
the form:

    function ZAPengine($pagename, $auth='zap') { ... }

> One question right off--I'm not sure how to set a session variable as
> an array, perhaps something like, assuming $x is the random number:
> 
> 	session_start();
> 	$_SESSION[ZAPlock][$x] = "whatever the lock value is...";
> 
> This way I can destroy all the ZAPlock values by:
> 
> 	unset($_SESSION[ZAPlock]);
> 
> Is this correct?  

Yes.

Pm




More information about the pmwiki-users mailing list