当前位置: 首页>>代码示例>>PHP>>正文


PHP CApi::SpecifiedUserLogging方法代码示例

本文整理汇总了PHP中CApi::SpecifiedUserLogging方法的典型用法代码示例。如果您正苦于以下问题:PHP CApi::SpecifiedUserLogging方法的具体用法?PHP CApi::SpecifiedUserLogging怎么用?PHP CApi::SpecifiedUserLogging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CApi的用法示例。


在下文中一共展示了CApi::SpecifiedUserLogging方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Handle


//.........这里部分代码省略.........
                                         $iError = isset($_FILES[$sInputName]['error']) ? (int) $_FILES[$sInputName]['error'] : UPLOAD_ERR_OK;
                                         if (UPLOAD_ERR_OK === $iError) {
                                             $this->oActions->SetActionParams(array('AccountID' => $this->oHttp->GetPost('AccountID', ''), 'FileData' => $_FILES[$sInputName], 'AdditionalData' => $this->oHttp->GetPost('AdditionalData', null), 'IsExt' => '1' === (string) $this->oHttp->GetPost('IsExt', '0') ? '1' : '0', 'TenantHash' => (string) $this->oHttp->GetPost('TenantHash', ''), 'Token' => $this->oHttp->GetPost('Token', ''), 'AuthToken' => $this->oHttp->GetPost('AuthToken', '')));
                                             \CApi::LogObject($this->oActions->GetActionParams());
                                             $aResponseItem = call_user_func(array($this->oActions, $sMethodName));
                                         } else {
                                             $sError = $this->oActions->convertUploadErrorToString($iError);
                                         }
                                     } else {
                                         if (!isset($_FILES) || !is_array($_FILES) || 0 === count($_FILES)) {
                                             $sError = 'size';
                                         } else {
                                             $sError = 'unknown';
                                         }
                                     }
                                 }
                                 if (!is_array($aResponseItem) && empty($sError)) {
                                     throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::UnknownError);
                                 }
                             } catch (\Exception $oException) {
                                 \CApi::LogException($oException);
                                 $aResponseItem = $this->oActions->ExceptionResponse(null, 'Upload', $oException);
                                 $sError = 'exception';
                             }
                             if (0 < strlen($sError)) {
                                 $aResponseItem['Error'] = $sError;
                             }
                         }
                         @ob_get_clean();
                         @header('Content-Type: text/html; charset=utf-8');
                         $sResult = \MailSo\Base\Utils::Php2js($aResponseItem);
                     } else {
                         if ('speclogon' === $sFirstPart || 'speclogoff' === $sFirstPart) {
                             \CApi::SpecifiedUserLogging('speclogon' === $sFirstPart);
                             \CApi::Location('./');
                         } else {
                             if ('sso' === $sFirstPart) {
                                 $oApiIntegratorManager = \CApi::Manager('integrator');
                                 try {
                                     $sHash = $this->oHttp->GetRequest('hash');
                                     if (!empty($sHash)) {
                                         $sData = \CApi::Cacher()->get('SSO:' . $sHash, true);
                                         $aData = \CApi::DecodeKeyValues($sData);
                                         if (!empty($aData['Email']) && isset($aData['Password'], $aData['Login'])) {
                                             $oAccount = $oApiIntegratorManager->loginToAccount($aData['Email'], $aData['Password'], $aData['Login']);
                                             if ($oAccount) {
                                                 $oApiIntegratorManager->setAccountAsLoggedIn($oAccount);
                                             }
                                         }
                                     } else {
                                         $oApiIntegratorManager->logoutAccount();
                                     }
                                 } catch (\Exception $oExc) {
                                     \CApi::LogException($oExc);
                                 }
                                 \CApi::Location('./');
                             } else {
                                 if ('autodiscover' === $sFirstPart) {
                                     $oSettings =& \CApi::GetSettings();
                                     $sInput = \file_get_contents('php://input');
                                     \CApi::Log('#autodiscover:');
                                     \CApi::LogObject($sInput);
                                     $aMatches = array();
                                     $aEmailAddress = array();
                                     \preg_match("/\\<AcceptableResponseSchema\\>(.*?)\\<\\/AcceptableResponseSchema\\>/i", $sInput, $aMatches);
                                     \preg_match("/\\<EMailAddress\\>(.*?)\\<\\/EMailAddress\\>/", $sInput, $aEmailAddress);
开发者ID:zhuomingliang,项目名称:webmail-lite,代码行数:67,代码来源:Service.php

示例2: Handle


//.........这里部分代码省略.........
                                     \CApi::LogObject($this->oActions->GetActionParams());
                                     $aResponseItem = call_user_func(array($this->oActions, $sMethodName));
                                 } else {
                                     $sError = $this->oActions->convertUploadErrorToString($iError);
                                 }
                             } else {
                                 if (!isset($_FILES) || !is_array($_FILES) || 0 === count($_FILES)) {
                                     $sError = 'size';
                                 } else {
                                     $sError = 'unknown';
                                 }
                             }
                         }
                         if (!is_array($aResponseItem) && empty($sError)) {
                             throw new \ProjectSeven\Exceptions\ClientException(\ProjectSeven\Notifications::UnknownError);
                         }
                     } catch (\Exception $oException) {
                         \CApi::LogException($oException);
                         $aResponseItem = $this->oActions->ExceptionResponse(null, 'Upload', $oException);
                         $sError = 'exception';
                     }
                     if (0 < strlen($sError)) {
                         $aResponseItem['Error'] = $sError;
                     }
                     @ob_get_clean();
                     if ('iframe' === $this->oHttp->GetPost('jua-post-type', '')) {
                         @header('Content-Type: text/html; charset=utf-8');
                     } else {
                         @header('Content-Type: application/json; charset=utf-8');
                     }
                     $sResult = \MailSo\Base\Utils::Php2js($aResponseItem);
                 } else {
                     if ('speclogon' === $sFirstPart || 'speclogoff' === $sFirstPart) {
                         \CApi::SpecifiedUserLogging('speclogon' === $sFirstPart);
                         \CApi::Location('./');
                     } else {
                         if ('sso' === $sFirstPart) {
                             $oApiIntegratorManager = \CApi::Manager('integrator');
                             try {
                                 $sHash = $this->oHttp->GetRequest('hash');
                                 if (!empty($sHash)) {
                                     $sData = \CApi::Cacher()->Get('SSO:' . $sHash, true);
                                     $aData = \CApi::DecodeKeyValues($sData);
                                     if (!empty($aData['Email']) && isset($aData['Password'], $aData['Login'])) {
                                         $oAccount = $oApiIntegratorManager->LoginToAccount($aData['Email'], $aData['Password'], $aData['Login']);
                                         if ($oAccount) {
                                             $oApiIntegratorManager->SetAccountAsLoggedIn($oAccount);
                                         }
                                     }
                                 } else {
                                     $oApiIntegratorManager->LogoutAccount();
                                 }
                             } catch (\Exception $oExc) {
                                 \CApi::LogException($oExc);
                             }
                             \CApi::Location('./');
                         } else {
                             if ('autodiscover' === $sFirstPart) {
                                 $oSettings =& \CApi::GetSettings();
                                 $sInput = \file_get_contents('php://input');
                                 //$sInput = '<?'.'xml version="1.0" encoding="utf-8"?'.'><Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"><Request><EMailAddress>test@afterlogic.com</EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema></Request></Autodiscover>';
                                 \CApi::Log('#autodiscover:');
                                 \CApi::LogObject($sInput);
                                 $aMatches = array();
                                 $aEmailAddress = array();
                                 \preg_match("/\\<AcceptableResponseSchema\\>(.*?)\\<\\/AcceptableResponseSchema\\>/i", $sInput, $aMatches);
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:67,代码来源:Service.php


注:本文中的CApi::SpecifiedUserLogging方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。