[pmwiki-users] User Registration/Login?

Ben Stallings ben at interdependentweb.com
Fri Aug 31 08:50:50 CDT 2007


Kathryn Andersen replied to Mike Shanley:
>> I know that there are a couple of ways to set up a user system 
>> (AuthUser, UserAuth), but I haven't found a way to allow users to 
>> register themselves... And I'm sure there has to be more than a few 
>> people who want THAT feature.
> 
>> Also, I would like to set things up so that in one of my groups, users 
>> can only edit pages they have created.
> 
> I know this issue has come up before on this list, but I can't remember
> when, or how it was solved.

Well, the good news is, ZAP can do all of that and more.  The bad news 
is, ZAP is not currently being actively maintained, and its 
documentation can be confusing unless you already know what it means to 
say.  But I can attest that ZAP does work, and works very well, once you 
get the hang of it.

For example, http://www.territorytellers.org/Membership/Join is a 
registration form that uses ZAP.  Use ?action=source to see the code.  I 
deny responsibility for the graphic design of the site.  I am planning 
to generalize this site to a ZAP-CMS bundle that will be posted in the 
Cookbook, but I can't say just when it will be available.

Restricting the editing of a page to the person who created it can be 
done a couple of ways.  I use DataQuery and DataPlates on my sites, so 
every group has its own EditForm, and a (:if equal $AuthId $Author:) 
conditional on the EditForm can do the trick.  If you have only one 
EditForm for your site, the conditional would be
(:if ( group Foo and equal $AuthId $Author ) :)

However, this method is not hackerproof.  Pm has posted a better way 
that involves a few lines in a config file, so if you search the list 
archives you should be able to find it there.

Best of luck, Mike!  If you wind up using ZAP, I'll be happy to field 
your questions.  --Ben



More information about the pmwiki-users mailing list