|
Cookbook /
LoginLogoutSummary: How to log out after logging in
Version: n/a
Prerequisites:
Status: Q&A
Maintainer:
Categories: Security, Administration
Questions answered by this recipeIf a user logs into a pmwiki, how does he log out? Logging in and outTo log out use the site page action logout. To enable this action add a link to the page, sidebar,
or add this action to the Site.Page Actions.
Change the conditional markup as appropriate for the access authorisation level you logged in at. NotesRelease NotesCommentsTo make this a little prettier, I created a page
then added this to local/config.php:
if (@$_GET['from']) {
$page = PageVar($_GET['from'], '$FullName');
if ($page == 'Main.LogOut') $PageRedirectFmt = '<h5><i>You have logged out.</i></h5>';
}
then placed this link in the sidebar: (:if authid:) [[Main/LogOut?action=logout | Log Out]] (:ifend:) Clicking on the link will then log you out, take you back to the homepage, and place the message "You have logged out." at the top of the page. And the "Log Out" link will only show when you're logged in. Cheers. ~Joseph
See AlsoContributors |