I am doing mobile apps and I would like to know how to check whether user is already logged in or not. Is there any observer event to track? If it is detected that the account is logged in, the user will be directed to Account Information page. If not, the user will be directed to login or registration page.

2 Answers 2

        //not logged in
        // logged in

You can check if user is logged in in the application with this piece of code:


After you can get information about user. For example:

echo "<pre>" print_r($customer_data);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.