[pmwiki-users] Determine whether the visitor is logged in

Patrick R. Michaud pmichaud at pobox.com
Thu May 5 08:33:36 CDT 2005


On Thu, May 05, 2005 at 03:14:00PM +0200, Peter Brink wrote:
> Patrick R. Michaud skrev:
> >
> >The markup
> >
> >    (:if authid:) Blah, Blah (:ifend:)
> >
> >should work.
> 
> Aha. I tried with (:if authid:* :) Blah, Blah (:ifend:) and that 
> included "guest" users as well, I'll try your approach - thanks.

Just to be clear, (:if authid:) just tells you if the user is
authenticated -- it doesn't (yet) check for specific ids.  But
one can write:

    (:if authid:)* [[LoginPage]]
    (:if auth edit:)* [[{$FullName}?action=diff | Page History]]
    (:if auth edit:)* [[{$FullName}?action=edit | Edit]]
    (:if auth upload:)* [[($FullName}?action=upload | Attachments]]
    (:ifend:)

and this shows a LoginPage link if the author has not yet logged in.

Pm



More information about the pmwiki-users mailing list