當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SessionManager::getError方法代碼示例

本文整理匯總了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");
}
開發者ID:sacredwebsite,項目名稱:vtigercrm,代碼行數:11,代碼來源:Logout.php

示例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");
}
開發者ID:cannking,項目名稱:vtigercrm-debug,代碼行數:19,代碼來源:Logout.php

示例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;
 }
開發者ID:casati-dolibarr,項目名稱:corebos,代碼行數:31,代碼來源:webservice.php


注:本文中的SessionManager::getError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。