[pmwiki-users] write ptv to profiles page is a user logout
noskule
noskule at gmx.net
Thu Mar 5 13:47:56 CST 2009
Peter Bowers schrieb:
> The difficulty I think you're going to have is that lots of users use
> a wiki without logging in until they need access to protected pages
I need the "last action" ptv only for registered authors
> most that do log in probably just close their browser when they are
> done rather than actually logging out. But those are functional specs
> -- presumably you've got that side of things already figured out...
no that's this mail about. The simples way would be to write a the "last
action" ptv on every browse and edit action. But that seams not so
smart, so I thought someone knows a way to do it just if the users get's
logged out. either way, by logout action and by timeout.
>
> In theory these lines in your config.php would suffice:
>
> if ($action == 'logout') {
> include_once("$FarmD/cookbook/toolbox.php");
> writeptv($pagename, MakePageName($Author), 'last_logout', time());
> }
>
> That is absolutely off-the-cuff so probably has syntax errors and etc
> besides any logic errors -- just trying to illustrate...
>
> -Peter
thanks for the toolbox hint
More information about the pmwiki-users
mailing list