Tanki
Member
Hello,
Can you help me please ?
How can I automatically authenticate a user in xenforo from an external script (php)?
Actually, when a user registers on my site. An account is created on xenforo. I would like to authenticate it automatically on xenforo by cookies.
So, I can retrieve his information:
I tried to connect it by saving the session, but there are many bugs. The session seems to exist but I do not see myself connected on the dashboard. If I try to connect with another user (user2), I will be connected with the other (User1)
PS : Sorry for my english, I'm from Switzerland.
The code is derived from (cc . @Contex) : https://github.com/Contex/XenAPI/tree/master/net/xenapi/XenAPI/examples/php
Thank you in advance for your help. Have a good day !
Tanki
Can you help me please ?
How can I automatically authenticate a user in xenforo from an external script (php)?
Actually, when a user registers on my site. An account is created on xenforo. I would like to authenticate it automatically on xenforo by cookies.
So, I can retrieve his information:
I tried to connect it by saving the session, but there are many bugs. The session seems to exist but I do not see myself connected on the dashboard. If I try to connect with another user (user2), I will be connected with the other (User1)
PHP:
$success = setcookie(
$response['cookie_name'],
$response['cookie_id'],
$response['cookie_expiration'],
$response['cookie_path'],
$response['cookie_domain'],
$response['cookie_secure'],
TRUE
);
PS : Sorry for my english, I'm from Switzerland.
The code is derived from (cc . @Contex) : https://github.com/Contex/XenAPI/tree/master/net/xenapi/XenAPI/examples/php
Thank you in advance for your help. Have a good day !
Tanki