[pmwiki-users] Determine whether the visitor is logged in
Joachim Durchholz
jo at durchholz.org
Thu May 5 10:03:48 CDT 2005
Patrick R. Michaud wrote:
> The answer to Jo's question
("How do I find out whether the current visitor is authorised at all,
regardless of the kind of authorisation")
> is slightly harder, because the authorization name ($AuthId) isn't
> set until a page has been read via RetrieveAuthPage. So, one could do
> something like:
>
> if ($AuthId == '') RetrieveAuthPage('PmWiki', 'read', false);
> if ($AuthId > '') {
> ...
> }
Looks good.
I'm using $DefaultPage to read a page that's supposed to be always
present (somebody *might* remove the PmWiki group *gg*).
Regards,
Jo
More information about the pmwiki-users
mailing list