Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Michael Molholt Posted November 19, 2019 Posted November 19, 2019 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?
bfarber Posted November 20, 2019 Posted November 20, 2019 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/
Recommended Posts
Archived
This topic is now archived and is closed to further replies.