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


PHP PFUser::isLoggedIn方法代码示例

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


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

示例1: __construct

 public function __construct($id, $is_active, PFUser $user, array $projects)
 {
     parent::__construct($id, $is_active);
     $this->projects = $projects;
     $this->has_projects = count($projects) > 0;
     $this->label = $GLOBALS['Language']->getText('include_menu', 'projects');
     $this->filter_project = $GLOBALS['Language']->getText('include_menu', 'filter_project');
     $this->menu_projects_text = $GLOBALS['Language']->getText('include_menu', 'projects');
     $this->browse_projects_text = $GLOBALS['Language']->getText('include_menu', 'browse_projects');
     $this->register_new_proj = $GLOBALS['Language']->getText('include_menu', 'register_new_proj');
     $this->is_trove_cat_enabled = ForgeConfig::get('sys_use_trove');
     $this->is_project_registration_enabled = ForgeConfig::get('sys_use_project_registration', true);
     $this->display_only_trovemap = $this->is_trove_cat_enabled && !$this->is_project_registration_enabled && !$this->projects;
     $this->display_dropdown = !$this->display_only_trovemap && $user->isLoggedIn();
 }
开发者ID:magarnier,项目名称:tuleap,代码行数:15,代码来源:NavBarItemProjectsPresenter.php

示例2: container

 private function container(array $params, ProjectManager $project_manager, PFUser $current_user)
 {
     $project_tabs = null;
     $project_name = null;
     $project_link = null;
     $project_is_public = null;
     $project_privacy = null;
     $sidebar_collapsable = false;
     if (!empty($params['group'])) {
         $this->show_sidebar = true;
         $project = ProjectManager::instance()->getProject($params['group']);
         $project_tabs = $this->getProjectTabs($params, $project);
         $project_name = $project->getPublicName();
         $project_link = $this->getProjectLink($project);
         $project_is_public = $project->isPublic();
         $project_privacy = $this->getProjectPrivacy($project);
         $sidebar_collapsable = !$current_user->isAnonymous() && $current_user->isLoggedIn() ? true : false;
     }
     $this->render('container', new FlamingParrot_ContainerPresenter($this->breadcrumbs, $this->force_breadcrumbs, $this->toolbar, $project_name, $project_link, $project_is_public, $project_privacy, $project_tabs, $this->_feedback, $this->_getFeedback(), $this->getForgeVersion(), $sidebar_collapsable));
     $this->keyboardModal();
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:21,代码来源:FlamingParrot_Theme.class.php

示例3: user_is_logged_in

 public function user_is_logged_in()
 {
     return $this->user->isLoggedIn();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:NavBarPresenter.class.php

示例4: addMyItem

 private function addMyItem(FlamingParrot_NavBarItemPresentersCollection $collection)
 {
     if ($this->user->isLoggedIn()) {
         $collection->addItem(new FlamingParrot_NavBarItemLinkPresenter('my', $this->isNavBarItemActive(array('/my/', '/widgets/')), '/my/', $GLOBALS['Language']->getText('menu', 'my_personal_page')));
     }
 }
开发者ID:magarnier,项目名称:tuleap,代码行数:6,代码来源:NavBarItemPresentersCollectionBuilder.php

示例5: shouldBeDisplayed

 /**
  * Returns true if the toggler should be displayed
  *
  * @param PFUser   $user    The user
  * @param string $id      the id of the toggler
  * @param bool   $default if we don't know, return $default
  *
  * @return bool
  */
 public static function shouldBeDisplayed(PFUser $user, $id, $default)
 {
     if ($user->isLoggedIn()) {
         $should_be_displayed = $user->getPreference('toggle_' . $id);
         //TODO: DRY 'toggle_'. $id
         if ($should_be_displayed !== false) {
             return $should_be_displayed;
         }
     }
     return $default;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:Toggler.class.php


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