本文整理汇总了PHP中Tinebase_Core::isHttpsRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Core::isHttpsRequest方法的具体用法?PHP Tinebase_Core::isHttpsRequest怎么用?PHP Tinebase_Core::isHttpsRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Core
的用法示例。
在下文中一共展示了Tinebase_Core::isHttpsRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initUserSession
/**
* init session after successful login
*
* @param Tinebase_Model_FullUser $user
* @param boolean $fixCookieHeader
*/
protected function _initUserSession($fixCookieHeader = true)
{
// FIXME 0010508: Session_Validator_AccountStatus causes problems
//Tinebase_Session::registerValidatorAccountStatus();
Tinebase_Session::registerValidatorMaintenanceMode();
if (Tinebase_Config::getInstance()->get(Tinebase_Config::SESSIONUSERAGENTVALIDATION, TRUE)) {
Tinebase_Session::registerValidatorHttpUserAgent();
} else {
Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' User agent validation disabled.');
}
// we only need to activate ip session validation for non-encrypted connections
$ipSessionValidationDefault = Tinebase_Core::isHttpsRequest() ? FALSE : TRUE;
if (Tinebase_Config::getInstance()->get(Tinebase_Config::SESSIONIPVALIDATION, $ipSessionValidationDefault)) {
Tinebase_Session::registerValidatorIpAddress();
} else {
Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' Session ip validation disabled.');
}
if ($fixCookieHeader && Zend_Session::getOptions('use_cookies')) {
/**
* fix php session header handling http://forge.tine20.org/mantisbt/view.php?id=4918
* -> search all Set-Cookie: headers and replace them with the last one!
**/
$cookieHeaders = array();
foreach (headers_list() as $headerString) {
if (strpos($headerString, 'Set-Cookie: TINE20SESSID=') === 0) {
array_push($cookieHeaders, $headerString);
}
}
header(array_pop($cookieHeaders), true);
/** end of fix **/
}
Tinebase_Session::getSessionNamespace()->currentAccount = Tinebase_Core::getUser();
}