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-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-user-help@;jakarta.apache.org>

Reply via email to