本文整理汇总了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'));
}
}
示例2: _checkLog
public static function _checkLog()
{
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
}
}
示例3: __construct
public function __construct()
{
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
}
}
示例4: __construct
public function __construct()
{
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
}
$this->assignToLayout('sidebar', new View('translate/sidebar'));
}
示例5: __construct
function __construct()
{
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
}
$this->setLayout('backend');
}
示例6: __construct
public function __construct()
{
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
echo 'Please Login';
header('location:index.php?job=login');
}
}
示例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')));
}
示例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'));
}
示例9: __construct
function __construct()
{
if (defined('CMS_BACKEND')) {
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
}
}
}
示例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();
}
示例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'));
}
示例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();
}
示例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;
}
}
示例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());
}
}
}
示例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'));
}