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


PHP AuthUser::load方法代码示例

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


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

示例1: _checkPermission

 private static function _checkPermission()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
 }
开发者ID:julpi,项目名称:FreshCMS,代码行数:7,代码来源:CommentController.php

示例2: _checkLog

 public static function _checkLog()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
 }
开发者ID:nowotny,项目名称:Fancy-Image-Gallery,代码行数:7,代码来源:FancyImageGalleryController.php

示例3: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
 }
开发者ID:chaobj001,项目名称:tt,代码行数:7,代码来源:PageController.php

示例4: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     $this->assignToLayout('sidebar', new View('translate/sidebar'));
 }
开发者ID:chaobj001,项目名称:tt,代码行数:8,代码来源:TranslateController.php

示例5: __construct

 function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     $this->setLayout('backend');
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:8,代码来源:CommentController.php

示例6: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         echo 'Please Login';
         header('location:index.php?job=login');
     }
 }
开发者ID:chaobj001,项目名称:tt,代码行数:8,代码来源:AdminUserController.class.php

示例7: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     $this->setLayout('backend');
     $this->assignToLayout('sidebar', new View('about/sidebar'), array('abouts' => Record::findAllFrom('About', '1=1 ORDER BY sequence')));
 }
开发者ID:sindotnet,项目名称:tiigo,代码行数:9,代码来源:AboutController.php

示例8: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     $this->setLayout('backend');
     $this->assignToLayout('sidebar', new View('../../plugins/frog_tags/views/sidebar'));
 }
开发者ID:harendt,项目名称:frog_tags,代码行数:9,代码来源:FrogTagsController.php

示例9: __construct

 function __construct()
 {
     if (defined('CMS_BACKEND')) {
         AuthUser::load();
         if (!AuthUser::isLoggedIn()) {
             redirect(get_url('login'));
         }
     }
 }
开发者ID:ariksavage,项目名称:superior-optical-eyewear,代码行数:9,代码来源:PluginController.php

示例10: __construct

 /**
  * Sets up the LoginController.
  */
 function __construct()
 {
     // Redirect to HTTPS for login purposes if requested
     if (defined('USE_HTTPS') && USE_HTTPS && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")) {
         $url = "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
         header("Location: {$url}");
         exit;
     }
     AuthUser::load();
 }
开发者ID:ariksavage,项目名称:superior-optical-eyewear,代码行数:13,代码来源:LoginController.php

示例11: __construct

 function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     $_SESSION['assets_folder'] = isset($_SESSION['assets_folder']) ? $_SESSION['assets_folder'] : assets_default_folder();
     $this->setLayout('backend');
     $this->assignToLayout('sidebar', new View('../../plugins/assets/views/sidebar'));
 }
开发者ID:julpi,项目名称:freshcms_assets,代码行数:10,代码来源:AssetsController.php

示例12: __construct

 public function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         echo 'Please Login';
         header('location:index.php?job=login');
     }
     //首页最近文章
     //$this->recent_post = Article::getPost(5, true);
     //侧栏分类
     $this->categories = Category::findAll();
     if (is_array($this->categories) && count($this->categories) > 0) {
         $temp = array();
         foreach ($this->categories as $k => $v) {
             $temp[$v->id] = get_object_vars($v);
         }
         $this->cahce_categories = $temp;
         $temp = array();
     }
     //Tags 后期改进为热词形式
     $hot_tags = Tag::findAll(20);
     //mprint_r($hot_tags, '$hot_tags');
     if (count($hot_tags) > 0) {
         $first = current($hot_tags);
         $last = end($hot_tags);
         foreach ($hot_tags as $k => $v) {
             $tags_list[$k]['word'] = $v->name;
             $tags_list[$k]['size'] = tagClouds($v->count, $first->count, $last->count);
         }
     }
     $this->tags_list = $tags_list;
     $tags = Tag::findAll();
     //var_dump($tags);
     $content_tag = Record::findAllFrom('ContentTag');
     //var_dump($content_tag);
     //关系表中存在的文章ID以及tag集合到一个数组中tag_cache  避免在遍历生成文章静态页时重复读取数据库
     //遍历所有tag 组合出方便调用的形式
     if (is_array($tags) && count($tags) > 0) {
         $temp_tags = array();
         foreach ($tags as $k => $v) {
             $temp_tags[$v->id] = $v->name;
         }
     }
     //遍历关系表
     if (is_array($content_tag) && count($content_tag) > 0) {
         $this->cahce_tags = array();
         foreach ($content_tag as $k => $v) {
             if (isset($temp_tags[$v->tag_id])) {
                 $this->cahce_tags[$v->content_id][] = $temp_tags[$v->tag_id];
             }
         }
     }
     //清空临时数据
     $tags = $content_tag = $temp_tags = array();
 }
开发者ID:chaobj001,项目名称:tt,代码行数:55,代码来源:AdminCacheController.class.php

示例13: auth

/**
 *	Check if user is authorized
 *
 *	@return boolean true is access granted, false if no access
 */
function auth()
{
    // You can insert your own code over here to check if the user is authorized.
    // This calls credentials from Wolf CMS login
    AuthUser::load();
    if (AuthUser::isLoggedIn()) {
        return true;
    } else {
        return false;
    }
}
开发者ID:nowotny,项目名称:wolf_ckeditor,代码行数:16,代码来源:filemanager.config.php

示例14: _checkPermission

 private static function _checkPermission()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     } else {
         if (!AuthUser::hasPermission('administrator')) {
             Flash::set('error', __('You do not have permission to access the requested page!'));
             redirect(get_url());
         }
     }
 }
开发者ID:julpi,项目名称:FreshCMS,代码行数:12,代码来源:BackupRestoreController.php

示例15: __construct

 function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
     if (!AuthUser::hasPermission('admin_view')) {
         redirect(URL_PUBLIC);
     }
     $this->setLayout('backend');
     $this->assignToLayout('sidebar', new View('../../plugins/funky_cache/views/sidebar'));
 }
开发者ID:bomura,项目名称:funky_cache,代码行数:12,代码来源:FunkyCacheController.php


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