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


PHP OC_Util::checkLoggedIn方法代码示例

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


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

示例1: delete

 public static function delete($parameters)
 {
     OC_Util::checkLoggedIn();
     $user = OC_User::getUser();
     $app = addslashes(strip_tags($parameters['app']));
     $key = addslashes(strip_tags($parameters['key']));
     if ($key === "" or $app === "") {
         return new OC_OCS_Result(null, 101);
         //key and app are NOT optional here
     }
     if (OC_Preferences::deleteKey($user, $app, $key)) {
         return new OC_OCS_Result(null, 100);
     }
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:14,代码来源:privatedata.php

示例2:

 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
\OC_Util::checkLoggedIn();
\OC::$server->getSession()->close();
if (!\OC_App::isEnabled('files_trashbin')) {
    exit;
}
$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '44';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '44';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
if ($file === '') {
    \OC_Response::setStatus(400);
    //400 Bad Request
    \OCP\Util::writeLog('core-preview', 'No file parameter was passed', \OCP\Util::DEBUG);
    exit;
}
if ($maxX === 0 || $maxY === 0) {
开发者ID:GitHubUser4234,项目名称:core,代码行数:31,代码来源:preview.php

示例3: checkSubAdminUser

 /**
  * Check if the user is a subadmin, redirects to home if not
  *
  * @return null|boolean $groups where the current user is subadmin
  */
 public static function checkSubAdminUser()
 {
     OC_Util::checkLoggedIn();
     if (!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
         header('Location: ' . OC_Helper::linkToAbsolute('', 'index.php'));
         exit;
     }
     return true;
 }
开发者ID:pinoniq,项目名称:core,代码行数:14,代码来源:util.php

示例4: checkLoggedIn

 /**
  * Check if the user is logged in, redirects to home if not. With
  * redirect URL parameter to the request URI.
  */
 public static function checkLoggedIn()
 {
     \OC_Util::checkLoggedIn();
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:8,代码来源:user.php

示例5: checkSubAdminUser

 /**
  * Check if the user is a subadmin, redirects to home if not
  *
  * @return null|boolean $groups where the current user is subadmin
  */
 public static function checkSubAdminUser()
 {
     OC_Util::checkLoggedIn();
     $userObject = \OC::$server->getUserSession()->getUser();
     $isSubAdmin = false;
     if ($userObject !== null) {
         $isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject);
     }
     if (!$isSubAdmin) {
         header('Location: ' . OC_Helper::linkToAbsolute('', 'index.php'));
         exit;
     }
     return true;
 }
开发者ID:reverserob,项目名称:core,代码行数:19,代码来源:util.php


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