}
$expires = time() + $length;
- header('Set-Cookie: session_key=' . $GLOBALS['session_key']);
+ header('Set-Cookie: session_key=' . $GLOBALS['session_key'] . '; Path=/');
db_update('wfpl_sessions', 'expires', $expires, 'where id=%i', $GLOBALS['session_id']);
}
-# return username if a session exists and is authenticated
+# return true if a session exists and is authenticated
function logged_in_as_admin() {
if(!session_exists()) {
return false;