Jump to content

Single Sign On - Issues Pulling User


Michael Molholt

Recommended Posts

According to this documentation - 

 "If your external application is on the same domain or subdomain as your IPS Community Suite you can easily include the IPS Community Suite framework and use the objects and methods made available to validate a user as being logged in."

We have an application on a subdomain - but the print function is returning what appears to be an encrypted username - which isn't matching up. That's this code in the documentation:

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

IPB support has said this isn't within their scope and to reach out to the community. Anyone else run into this or have possible solutions?

Link to comment
Share on other sites

If you see an MD5 hash there (32 character alpha-numeric value) then most likely it is the language string for "guest". A more robust solution to the documentation would be something along the lines of

$output = \IPS\Member::loggedIn()->name;

\IPS\Member::loggedIn()->language()->parseOutputForDisplay( $output );

print $output;

That said, this means you are not being recognized as logged in. If you are logged in, then this could be because your cookies are locked to the community domain or path, and you may need to override the cookie settings for your community so that they can be read globally on a subdomain or a different path.

https://invisioncommunity.com/4guides/advanced-options/configuration-options/overriding-default-cookie-options-r247/

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...