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


PHP UsersHelperRoute::getProfileRoute方法代码示例

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


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

示例1: getLogout

 public static function getLogout($params)
 {
     $logout = new stdClass();
     $logout->menu = self::getMenu($params);
     $logout->profileLink = JRoute::_('index.php?option=com_users&view=profile&layout=edit&Itemid=' . UsersHelperRoute::getProfileRoute());
     $logout->option = 'com_users';
     $logout->task = 'user.logout';
     $logout->return = self::getReturnURL($params, 'logout');
     $logout->K2CommentsEnabled = JComponentHelper::getParams('com_k2')->get('comments');
     return $logout;
 }
开发者ID:Naldo100,项目名称:k2-v3-dev-build,代码行数:11,代码来源:helper.php

示例2: display

 /**
  * Method to display the view.
  *
  * @access	public
  * @param	string	$tpl	The template file to include
  * @since	1.0
  */
 function display($tpl = null)
 {
     $app =& JFactory::getApplication();
     $user =& JFactory::getUser();
     // If the user is logged in, send them to their profile.
     if (!$user->get('guest')) {
         $itemid = UsersHelperRoute::getProfileRoute();
         $itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
         $app->redirect(JRoute::_('index.php?option=com_users&view=profile' . $itemid, false));
         return false;
     }
     // Get the appropriate form.
     if ($this->_layout === 'confirm') {
         $form =& $this->get('ResetConfirmForm');
     } elseif ($this->_layout === 'complete') {
         // Get the token and user id from the confirmation process.
         $token = $app->getUserState('com_users.reset.token', null);
         $userId = $app->getUserState('com_users.reset.user', null);
         // Check the token and user id.
         if (empty($token) || empty($userId)) {
             JError::raiseError(403, JText::_('ALERTNOTAUTH'));
             return false;
         }
         $form =& $this->get('ResetCompleteForm');
     } else {
         $form =& $this->get('ResetRequestForm');
     }
     // Check the form.
     if (JError::isError($form)) {
         JError::raiseError(500, $form->getMessage());
         return false;
     }
     // Check for errors.
     if (count($errors =& $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Push the data into the view.
     $this->assignRef('form', $form);
     parent::display($tpl);
 }
开发者ID:joebushi,项目名称:joomla,代码行数:48,代码来源:view.html.php

示例3:

        $langScript = '
			var JLanguage = {};
			JLanguage.WHAT_IS_OPENID = \'' . JText::_('K2_WHAT_IS_OPENID') . '\';
			JLanguage.LOGIN_WITH_OPENID = \'' . JText::_('K2_LOGIN_WITH_OPENID') . '\';
			JLanguage.NORMAL_LOGIN = \'' . JText::_('K2_NORMAL_LOGIN') . '\';
			var modlogin = 1;
		';
        $document = JFactory::getDocument();
        $document->addScriptDeclaration($langScript);
        JHTML::_('script', 'openid.js');
    }
    // Get user stuff (do not edit)
    $usersConfig = JComponentHelper::getParams('com_users');
    // Define some variables depending on Joomla! version
    $passwordFieldName = K2_JVERSION != '15' ? 'password' : 'passwd';
    $resetLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=reset&Itemid=' . UsersHelperRoute::getResetRoute() : 'index.php?option=com_user&view=reset');
    $remindLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=remind&Itemid=' . UsersHelperRoute::getRemindRoute() : 'index.php?option=com_user&view=remind');
    $registrationLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute() : 'index.php?option=com_user&view=register');
    $option = K2_JVERSION != '15' ? 'com_users' : 'com_user';
    $task = K2_JVERSION != '15' ? 'user.login' : 'login';
    require JModuleHelper::getLayoutPath('mod_k2_user', 'login');
} else {
    JHTML::_('behavior.modal');
    $user->profile = modK2UserHelper::getProfile($params);
    $user->numOfComments = modK2UserHelper::countUserComments($user->id);
    $menu = modK2UserHelper::getMenu($params);
    $profileLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=profile&layout=edit&Itemid=' . UsersHelperRoute::getProfileRoute() : 'index.php?option=com_user&view=user&task=edit');
    $option = K2_JVERSION != '15' ? 'com_users' : 'com_user';
    $task = K2_JVERSION != '15' ? 'user.logout' : 'logout';
    require JModuleHelper::getLayoutPath('mod_k2_user', 'userblock');
}
开发者ID:emavro,项目名称:k2,代码行数:31,代码来源:mod_k2_user.php

示例4: htmlspecialchars

        ?>
									<?php 
        echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username'), ENT_COMPAT, 'UTF-8'));
        ?>
								<?php 
    }
    ?>
							</span>
						<?php 
}
?>
					</a>
				</div>
				<div class="login-data">
					<a class="btn btn-primary" href="<?php 
echo JRoute::_('index.php?option=com_users&view=profile&Itemid=' . UsersHelperRoute::getProfileRoute());
?>
">Meu Perfil</a>
					<input type="submit" name="Submit" class="btn btn-inverse" value="<?php 
echo JText::_('JLOGOUT');
?>
" />
					<input type="hidden" name="option" value="com_users" />
					<input type="hidden" name="task" value="user.logout" />
					<input type="hidden" name="return" value="<?php 
echo $return;
?>
" />
					<?php 
echo JHtml::_('form.token');
?>
开发者ID:glauberm,项目名称:cinevi,代码行数:31,代码来源:default_logout.php


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