[pmwiki-devel] ZAPcart question...

The Editor editor at fast.st
Mon Mar 19 15:10:31 CDT 2007


I'm fishing for an idea, if anyone has one...

In ZAPcart, the shopping cart stores their order information in a wiki
page connected to their authid.  However, I don't want to require
users to create a full-fledged members account to use the store.  So
I'm thinking I would log them in under a temporary AuthId keyed to
some 10 digit random number or maybe Guest131224232.

However most of my site is set to

$DefaultPasswords['read'] = 'id:*';

and I don't really want those with only a guest store account to be
able to access the members area.  I also have many conditionals based
on (:if authid:) which I would prefer to fail in this situation.  Is
there some way to set things to accomplish this?

Possibilities:

1) Do something roughly along these lines in config:

if (preg_match('/^Guest[0-9]+$/', $AuthId) $DefaultPasswords['read'] = 'Admin';
else $DefaultPasswords['read'] = 'id:*';

2) Set up a custom conditional, like (:if zapauthid:) which checks to
see if authenticated and user name is not Guest[0-9]..., or perhaps
even overwrite the existing authid conditional...

Guess these could solve most of my problems.  Just wondering if
there's an easy way to do this I'm not thinking of?

Cheers,
Dan



More information about the pmwiki-devel mailing list