How can I check if my account is logged in or not?

Hi everybody! I want to check if an account is logged in or not with account data taken from SQL DB. If logged in, go to the homepage, otherwise, go to the login page. How that does it? I thought of session and tried it but no success. Please help me! Thanks and best regard,
1 answers

Hi Kien,

Usually when a user is logged in he will get another role than the anonymous user (not logged in). In the Navigation section you can choose to have a different home page or home microflow per role.

Using SQL DB is not a safe way to check whether a user is logged in. The login action is done at the client and the DB at the server site. So if you want a user to automatically login based on earlier actions, you should use a secure HTTP cookie with a token in it. Otherwise there is no way that you can link the client session to an earlier login of the user.


Best regards,

Diederik Wentink