Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Liam Hicks Posted November 26, 2021 Posted November 26, 2021 (edited) Hi, Using the SSO example provided here: I'm getting a random string of characters e.g. '7a63e65db1164d4b5e7824e12fc97f64'. I'm using a Laravel install, with the forums folder placed in the '/public' directory. I've created a test.php file in the '/public' directory which has the following in it: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); /* Require the init.php file from the Community Suite root directory */ require '/home/forge/mysite.com/public/forums/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; print \IPS\Member::loggedIn()->email; If I move my test.php file inside the forums folder, I'm able to get the name and email correctly. Any thoughts on why I cannot get the details when they're outside the forums folder? Edited November 26, 2021 by Liam Hicks
Jim M Posted November 27, 2021 Posted November 27, 2021 Thanks for posting! Unfortunately, this issue is beyond the scope of our technical support. 👩💻 Our technical support is happy to help you with the Invision Community platform, but we're unable to help with things like server management, theme questions and modifications. I've moved this to our Community Support area where other Invision Community owners will see it and help where they can.
Liam Hicks Posted November 27, 2021 Author Posted November 27, 2021 5 hours ago, Jim M said: Thanks for posting! Unfortunately, this issue is beyond the scope of our technical support. 👩💻 Our technical support is happy to help you with the Invision Community platform, but we're unable to help with things like server management, theme questions and modifications. I've moved this to our Community Support area where other Invision Community owners will see it and help where they can. Hi, This is none of those things - it's a question specifically related to an example that you yourselves provide as documentation.
Daniel F Posted November 27, 2021 Posted November 27, 2021 23 hours ago, Liam Hicks said: I'm getting a random string of characters e.g. '7a63e65db1164d4b5e7824e12fc97f64'. 1. I guess that's the hash for the "Guest" langstring;) 2. Have you set the cookie domain and path in your IPS installation? My guess is that the IPS cookie is set for www.yourdomain.com/forums. Pls see https://invisioncommunity.com/4guides/advanced-options/configuration-options/using-constantsphp-r25/ for further information how to set the cookie domain I would suggest to also take a look at https://invisioncommunity.com/4docs/advanced-usage/development/single-sign-on-sso-r98/
Recommended Posts