当前位置: 首页>>代码示例>>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;未经允许,请勿转载。