[pmwiki-users] {Disarmed} Re: conditional display of text based on authgroup

Hans design5 at softflow.co.uk
Wed Nov 28 08:13:39 CST 2007


Wednesday, November 28, 2007, 2:01:07 PM, Iannis wrote:

> Further question then: How can I logout and login under a different
> user id  without  restarting my browser?
> ...[snip]

Have a look at http://www.pmwiki.org/wiki/PmWiki/AuthUser
and http://www.pmwiki.org/wiki/Cookbook/AuthUser

I assume you have installed scripts/authuser.php in config.php with

         include_once("$FarmD/scripts/authuser.php");

?action=login and ?action=logout should work.

you can make links for these somewhere like the SideBar:

(:if ! auth edit:)
[[{*$FullName}?action=login|login]]
(:else:)
[[{*$FullName}?action=logout|logout]]
(:ifend:)

and to tie the author cookie to the logged in user put in config.php:
quote from Cookbook/AuthUser:

## If there's no Author yet, use the verified identity.
include_once("$FarmD/scripts/author.php");
if($AuthId && !@$_COOKIE[$AuthorCookie]) {
  $Author = $AuthId; setcookie($AuthorCookie,
    $Author, $AuthorCookieExpires, $AuthorCookieDir); }


Hope this helps!

Hans




More information about the pmwiki-users mailing list