else if (/*request::$https && */ isset($_COOKIE['HTTPS_ONLY'])) // NOTE: We should ALREADY be on request::$https!!! Because it's checked before user::init() is called!
{ // We need to redirect to the user login page ... and stop there! ... actually ... we are just gonna clear the HTTPS_ONLY cookie, because the user.id is no longer valid!
// redirect('/login?next=' . urlencode(env::canonical('https:')) . '&message=session-expired'); // `URI request too long` ... basically it goes into an infinite loop!
setcookie('HTTPS_ONLY', null, -1, '/');
unset($_COOKIE['HTTPS_ONLY']);
// env::https_redirect('/login?next=' . url_encode(...)); // User session probably expired! maybe we should show a message in /login and unset the cookie there! Like `Your session has expired please login again!` or whatever!
}
}
private static function load_permissions()
/**
* Get member by id/index
*
* @param string|int $key
* @return mixed
*/
public function __get($key)
{
return $this->_properties[$key];
}
/**
* Set member by id/index
*
* @param string|int $key
* @param mixed $value
* @return void
*/
public function __set($key, $value)
{
$this->_properties[$key] = $value;
}
function __isset($key)
{
return isset($this->_properties[$key]);
}
function __unset($key)
{
unset($this->_properties[$key]);
}
private function load_permissions()
{
self::$_permissions = $this->_db->get_array( 'SELECT SQL_CACHE ' . // cached because these tables are less frequenty updated!
'g.alias as g_alias,' .
'p.alias as p_alias,' .
'acl.object_id' .
' FROM acl' .
' JOIN acl_permissions p ON p.id = acl.permission_id' .