[pmwiki-users] wikish checking if user logged in

Peter Bowers pbowers at pobox.com
Thu Jul 4 08:31:29 CDT 2013


On Sat, Jun 29, 2013 at 10:56 AM, Mark Lee <mark.lee.phd at gmail.com> wrote:

> I found this to work the way I wanted:
>
> if test -n "$AuthId"
> then
> .... wikish code goes here and executes only if logged in.....
> fi
>


What you've come up with here is a good solution.  You can also use pmwiki
conditionals like so:

if test --pmwiki auth edit MyGroup.MyPage
then
   ... wikish code goes here and executes only if user has edit privileges
on MyGroup.MyPage
fi

That allows you a little more flexibility if later you will have people
with a username/password who do not have edit privileges on the page in
question.

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130704/f412d25d/attachment.html>


More information about the pmwiki-users mailing list