本文整理汇总了PHP中SessionManager::getError方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionManager::getError方法的具体用法?PHP SessionManager::getError怎么用?PHP SessionManager::getError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionManager
的用法示例。
在下文中一共展示了SessionManager::getError方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vtws_logout
function vtws_logout($sessionId, $user)
{
$sessionManager = new SessionManager();
$sid = $sessionManager->startSession($sessionId);
if (!isset($sessionId) || !$sessionManager->isValid()) {
return $sessionManager->getError();
}
$sessionManager->destroy();
// $sessionManager->setExpire(1);
return array("message" => "successfull");
}
示例2: vtws_logout
function vtws_logout($sessionId, $user)
{
global $adb;
$sql = "select type from vtiger_ws_operation where name=?";
$result = $adb->pquery($sql, array("logout"));
$row = $adb->query_result_rowdata($result, 0);
$requestType = $row['type'];
if ($_SERVER['REQUEST_METHOD'] != $requestType) {
throw new WebServiceException(WebServiceErrorCode::$OPERATIONNOTSUPPORTED, "Permission to perform the operation is denied");
}
$sessionManager = new SessionManager();
$sid = $sessionManager->startSession($sessionId);
if (!isset($sessionId) || !$sessionManager->isValid()) {
return $sessionManager->getError();
}
$sessionManager->destroy();
// $sessionManager->setExpire(1);
return array("message" => "successfull");
}
示例3: writeErrorOutput
$sessionId = vtws_getParameter($_COOKIE, 'PHPSESSID');
}
// END
$adoptSession = true;
} else {
writeErrorOutput($operationManager, new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED, "Authentication required"));
return;
}
}
$sid = $sessionManager->startSession($sessionId, $adoptSession);
if (!$sessionId && !$operationManager->isPreLoginOperation()) {
writeErrorOutput($operationManager, new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED, "Authentication required"));
return;
}
if (!$sid) {
writeErrorOutput($operationManager, $sessionManager->getError());
return;
}
$userid = $sessionManager->get("authenticatedUserId");
if ($userid) {
$seed_user = new Users();
$current_user = $seed_user->retrieveCurrentUserInfoFromFile($userid);
} else {
$current_user = null;
}
$operationInput = $operationManager->sanitizeOperation($input);
$includes = $operationManager->getOperationIncludes();
foreach ($includes as $ind => $path) {
checkFileAccessForInclusion($path);
require_once $path;
}