X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   X-Cart Login Session (https://forum.x-cart.com/showthread.php?t=69475)

trinh 07-01-2014 06:49 AM

X-Cart Login Session
 
I'm currently using X-Cart and have some employees (each has an X-Cart administration account). I also develop some custom PHP webpages (not X-Cart modules) which require my employees to login before they can access those webpages. I want my employees to use their existing X-Cart accounts to login.

For example, whenever my employees access custom webpages, if they're already logged in to X-Cart, they should be fine. If not, they should be redirected to X-Cart's admin login page.

My question is: How can my PHP scripts check if users are already logged in to X-Cart? I tried to include auth.php but I got the error message "Can not initiate application! Please check configuration."

Thanks a lot!

tony_sologubov 07-03-2014 10:58 AM

Re: X-Cart Login Session
 
Hi!

Could you please let us know what X-Cart version you are using?

You should update your forum account's signature and put your X-Cart version there. It will help you get faster responses in the future.

trinh 07-03-2014 11:06 AM

Re: X-Cart Login Session
 
Quote:

Originally Posted by tony_sologubov
Hi!

Could you please let us know what X-Cart version you are using?

You should update your forum account's signature and put your X-Cart version there. It will help you get faster responses in the future.


Thanks for replying me. I'm using v4.4.3.

tony_sologubov 07-03-2014 11:20 AM

Re: X-Cart Login Session
 
This error means that auth.php was included incorrectly.
You should try to include it in the script inside X-Cart's root folder.

Otherwise, it will not work properly.


All times are GMT -8. The time now is 01:08 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.