Fermé

Help with custom AJAX login cookies

I am trying to enable a custom login session across both English and French subdomains.

-WordPress is installed only on domain.com.

-There are only [url removed, login to view] and [url removed, login to view] as WPML subdomains, with redirects (as instructed here: [url removed, login to view]).

-No issues with navigation across subdomains.

My AJAX custom login successfully signs in the user with wp_signon(). The AJAX request successfully returns 4 cookies. However, session is not initiated; on page refresh, user is still not connected.

When I login through /[url removed, login to view], the session is properly initiated.

It seems like the solution lies in the proper configuration of COOKIE_DOMAIN, COOKIEPATH & SITECOOKIEPATH settings:

define('COOKIE_DOMAIN', '.[url removed, login to view]');

define('COOKIEPATH', '/');

define('SITECOOKIEPATH', '/');

Anyone has a solution for this?

Compétences : AJAX, jQuery / Prototype, PHP, WordPress

Voir plus : wordpress org login, ajax onlie help, login ajax, login ajax php mysql, login ajax mysql, register login ajax php

Concernant l'employeur :
( 0 commentaires ) Canada

N° du projet : #8512288

6 freelance ont fait une offre moyenne de 24 $ pour ce travail

VnBestSolutions

Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Plus

54 $ USD en 1 jour
(101 Commentaires)
6.4
erskywebsolution

Hello Dear sir/madam, Thanks for the open project.. We have very good (4+ Year) experience developer in PHP ,JOOMLA ,WORD-PRESS,OS-Commerce. We have strong experience in below things. PHP : core php Custo Plus

15 $ USD en 1 jour
(22 Commentaires)
3.6
stevenlsc025

Hi I'm Steven I have skills on this, leave me message about your environment, I will help troubleshooting and fix it. You only pay after bug is fixed :) Steven Thanks.

15 $ USD en 1 jour
(3 Commentaires)
3.2
anujayk

I am an experience web developer having good hands on latest relevant technologies used for the front end and backend development,i am experienced in doing the similar projects,i could be results a better resource for Plus

20 $ USD en 1 jour
(3 Commentaires)
1.9
chadmilden

What you are doing should work, it may be a separate problem. I would need access to the webpage code in order to debug

15 $ USD en 1 jour
(0 Commentaires)
0.0
suhrit007

I have worked on so many wordpress sites. I have gone through your problem. I understand your need. Your custom ajax login is probably not accessing the wp-login.php that's why it's unable to use session or cookies. Plus

25 $ USD en 1 jour
(0 Commentaires)
0.0