incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.jaqu...@me.com>
Subject Re: Get Username
Date Sun, 05 Oct 2008 17:36:49 GMT
If you are a Guest, you aren't an authenticated user. Users who aren't  
authenticated don't have UserProfiles. The way to do this for all  
users, including Guests, is to call  
WikiSession.getUserPrincipal().getName().

On Oct 5, 2008, at 5:58 AM, illusions2003@gmx.net wrote:

> Hi,
>
> although I am still not able to login via JSPWiki using JBoss, I am  
> trying to get the username of the currently logged in user by using  
> a Plugin.
>
> So I tried:
> WikiSession session =context.getWikiSession();
> String name  
> = 
> context 
> .getEngine().getUserManager().getUserProfile(session).getLoginName();
>
> But I also get "null", although I am logged in as a Guest.
>
> Any ideas?
>
> Regards
> -- 
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


Mime
View raw message