function ValidateSession($sessionKey, $appcode) { $validUId = -1; if (IsValidAppCode($appcode)) { $obj_result = BL_manageWebService::validateSession($sessionKey); if ($obj_result->type == 1) { $validUId = $obj_result->data->userId; } } return $validUId; }