[pmwiki-users] fake logout

Radu radu at monicsoft.net
Tue Mar 8 00:39:58 CST 2005


I've been trying to do the following:

%green%'''''Welcome, (:if author :){$Author}'''''%% 
([[{$Name}?action=logout|logout]])
*[[{$Name}?action=edit | Edit]](:if !author:)Guest'''''%%
*[[Main/Login]](:if:)

After defining logout and a conditional for author in config.php
if ($action == 'logout') $GLOBALS['Author']='';
$Conditions['author'] = "\$GLOBALS['Author']!=\$condparm";

This is in no way an interface for UserAuth; I would simply like to allow 
people to remove their Author session string within the current 
Authentication scheme.

Problem: the Author change does not seem to 'stick'; it works once clicked, 
but if moving to another page, the cookie restores it. Should I set the 
author cookie on logout to expire $Now?

Also, would this little trick deserve a recipe (or is there something 
already out there that I missed again? :)


Cheers,
Radu
(www.monicsoft.net) 




More information about the pmwiki-users mailing list