We added a new page/tab xyz like Products on developer portal using content menu item. I want to throw error message on that page if the user navigates on that page if he is not logged in asking him to log in.
Is there a way to find the information of the user who is logged in or to verify if some one has logged in or not.
There is one html element or anchor tag through we can find the username of logged in user but that element do not exist when user is not logged in.
if it is static page and you are writng the code in developer portal, you can add a script to check the session cookie which is there or not. Hence you can show authroised and unauthorised.
Also there is another way, only while login the account menu will be displayed. so you can check with that as well.