Determine if the PHP site is logged in
My current need is to integrate a Magento mall and a forum. The main purpose is to do two sites share a member login. No more than two consecutive times.
My practice is to first determine whether Magento login success, if so, then the forum also login (here is the login is to get the user name and password from Mangento, and then save the forum after the success of the login status).
------Solution--------------------
Can be two sites to connect the same table inside the consolidated database, and then set a value, similar to a Boolean value, can be set 0 and 1, two Web sites to check this value when opened, if it is 1, directly call the cookie login, if 0, jump to the landing page, lost password login, and then automatically set this value to 1 after login, This value is 0 when logged out and when the cookie expires. I do not know whether the answer to meet the requirements ~
------Solution--------------------
Explore
Can be two sites to connect the same table inside the consolidated database, and then set a value, similar to a Boolean value, can be set 0 and 1, two Web sites to check this value when opened, if it is 1, directly call the cookie login, if 0, jump to the landing page, lost password login, and then automatically set this value to 1 after login, This value is 0 when logged out and when the cookie expires. I do not know whether the answer to meet the requirements ~
------Solution--------------------
First of all, you have to understand the 2 Web site of the respective login principle is what! Look at their login to judge through the cookie or session, there is 2 of the website of the respective users how to realize the sharing of information! To achieve a one-stop login, see the reference to the set of DZ!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.