> And I changed the properties file to point to this logout class of course.

Then you have changed the "action.logout" property to MyLogOut, correct?

Turbine treats the designated action.logout and action.login differently than other 
actions.  My own experiences with this issue have shown that this causes nothing but 
headaches.  The problems you are experiencing could be caused by this.  Another 
side-effect that caused me lots of problems is that the session-based pull tools were 
not immediately refreshed.  This meant that after log out and/or log in the current 
user would still have the previous user's set of pull tools for the duration of that 
request.  However, all subsequent requests worked correctly.

What I did...
In my non-jetspeed turbine apps, I have always used custom log out and log in classes 
but did not register it with action.logout or action.login.

hth,
Scott

> -----Original Message-----
> From: Aurelien Pernoud [mailto:apernoud@;sopragroup.com]
> Sent: Friday, November 08, 2002 4:22 AM
> To: 'Jetspeed Users List'
> Subject: data.getUser() is null, not data.getUserFromSession() ...
> 
> 
> Hi there,
> 
> in my portlets I've always been using the rundata.getUser() method to get
> the user, but I found a case where data.getUser is null, and
> data.getUserFromSession() works... I don't get it.
> 
> It works everywhere in my app except in ... Log Out. In fact I need my own
> Logout class, and have to test if the user is an admin or not. So here's
> what I have in my Logout class :
> 
> public class MyLogOut extends JLogoutUser
> {
>   public void doPerform(RunData data) throws Exception
>   {
>     if (data.getUser() == null)
>       {System.out.println("User is null...");return;};
> 
>       (...)
> 
>       super.doPerform(data);
>   }
> }
> And I changed the properties file to point to this logout class of course.
> 
> I always have the print "User is null..." on the console :(
> I then looked the other functions of rundata, and found that if I used the
> getUserFromSession() there, then it works and I can test if the user is
> admin or not.
> 
> I don't get why I have getUser returning null, only in the log out... And
> I
> checked, I'm not doing the Logout of jetspeed before mine :) (the
> super.doperform(data) is after the test on getUser !)
> 
> Any suggestions ?
> 
> Aur�lien Pernoud
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:jetspeed-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:jetspeed-user-
> [EMAIL PROTECTED]>

Reply via email to