How to check if a user is logged in


#1

Hi there, I wonder if anyone can help me with this please?

If I have a page that I want to be accessible both prior and post login.
But if the user is logged in, I would want to display the it as a SSL
page, and if user is not logged in, I would display it as normal. I have
used

If session[:user]

SSL required :index

End

However, this gives an type error, says session[:user] is an array?

What am I doing wrong?

Thanks in advance.