Jump to content

SSO member


Arasius

Recommended Posts

Hi Guys...

 

Im trying to implement SSO,, but when I put this code:

 

/* Require the init.php file from the Community Suite root directory */
require '/path/to/suite/init.php';

/* Initiate the session to verify who this user is */
\IPS\Session\Front::i();

/* Print the user's name */
print \IPS\Member::loggedIn()->name;

In a external php file...I'm getting a number instead a name.

A number like this: 40aa697366aa1ecd341992ab13fad20U3

 

yes I have changed init.php path....

 

Any clue?

Link to comment
Share on other sites

Where is the file located in terms of the web path? It's possible that the cookies aren't being sent to your script, because by default the cookie path for cookies set by the suite is just the suite itself, and they are also locked to HTTPS only if your base URL is HTTPS (so if your IPS installation is located at www.example.com/community/, the cookies aren't sent if you visit www.example.com/news/ or news.example.com, and they are also locked to HTTPS only if your base URL is HTTPS.

There are instructions for changing the cookie settings at

 

Link to comment
Share on other sites

1 hour ago, Arasius said:

This is the result:


array(1) { ["IPSSessionFront"]=> string(32) "6dc98cde5cb389d09d3984c25cd83466" }

 

If you're definitely logged into the site (front not ACP), which I presume you are, that's really weird. If the site is web accessible, you could post a link to the file, and I can have a look to try and figure out why the cookies aren't being sent. I just can't think of any reason that it wouldn't work, provided that it is being accessed over the same protocol (http/https) and domain, and it's within the suite's directory.

Link to comment
Share on other sites

10 minutes ago, Colonel_mortis said:

If you're definitely logged into the site (front not ACP), which I presume you are, that's really weird. If the site is web accessible, you could post a link to the file, and I can have a look to try and figure out why the cookies aren't being sent. I just can't think of any reason that it wouldn't work, provided that it is being accessed over the same protocol (http/https) and domain, and it's within the suite's directory.

Sent you by pm.

Ty !!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...