sreenivasrx@yahoo.com wrote:
> I have seen the following code that checks if the user has logged into a Portal:
>
> #================================================= ==============#
> PortletSession session = request.getPortletSession();
> User user = request.getUser();
>
> if(session == null || user == null)
> {
> .................
> }
> #================================================= ==============#
>
> Why do we need to check if "session" or "user" is null? Why can't we just check if "user" is null?


Perhaps in case sessions for anonymous users are enabled