GetSimple Support Forum

Full Version: Does cookie_check() work in GetSimple 3.0?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does cookie_check() work in GetSimple 3.0, or at least how I think it should?

For example's sake, the following if used in a template doesn't work as expected.

Code:
<?php

if (!function_exists('cookie_check')) { include('admin/inc/cookie_functions.php'); }

echo (cookie_check()) ? "<p>You're logged in.</p>" : "<p>You're not logged in.</p>";

?>

It always ends up saying "You're not logged in." whether logged into the back-end or not. Also, GSCOOKIEISSITEWIDE is set to TRUE as is GSDEBUG in gsconfig.php and the website health check is all in the green.
sal Wrote:Does cookie_check() work in GetSimple 3.0, or at least how I think it should?

For example's sake, the following if used in a template doesn't work as expected.

Code:
<?php

if (!function_exists('cookie_check')) { include('admin/inc/cookie_functions.php'); }

echo (cookie_check()) ? "<p>You're logged in.</p>" : "<p>You're not logged in.</p>";

?>

It always ends up saying "You're not logged in." whether logged into the back-end or not. Also, GSCOOKIEISSITEWIDE is set to TRUE as is GSDEBUG in gsconfig.php and the website health check is all in the green.

The sitewide cookie functionality is broken in GS 3.0 (see here).
See the Wiki for a workaround.