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


PHP Legacy_Utils::getUserName方法代码示例

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


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

示例1: smarty_modifier_xoops_user

function smarty_modifier_xoops_user($uid, $key, $flag = 2)
{
    require_once XOOPS_MODULE_PATH . '/profile/class/handler/Definitions.class.php';
    $handler = xoops_gethandler('member');
    $user = $handler->getUser(intval($uid));
    if (in_array($key, Profile_DefinitionsHandler::getReservedNameList())) {
        if ($key == 'user_name') {
            return Legacy_Utils::getUserName($uid);
        }
        if (is_object($user) && $user->isActive()) {
            return $flag == 2 ? $user->getShow($key) : $user->get($key);
        }
    } else {
        $profileHandler = Legacy_Utils::getModuleHandler('data', 'profile');
        $profile = $profileHandler->get($uid);
        if (is_object($profile) && is_object($user) && $user->isActive()) {
            return $profile->showField($key, $flag);
        }
    }
    return null;
}
开发者ID:nouphet,项目名称:rata,代码行数:21,代码来源:modifier.xoops_user.php

示例2: _getPagetitle

	/**
	 * _getPageTitle
	 * 
	 * @param	void
	 * 
	 * @return	string
	**/
	protected function _getPagetitle()
	{
		return Legacy_Utils::getUserName($this->_getId());
	}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:11,代码来源:AvatarEditAction.class.php

示例3: _getPagetitle

 /**
  * _getPageTitle
  * 
  * @param	void
  * 
  * @return	string
  **/
 protected function _getPagetitle()
 {
     return Legacy_Utils::getUserName(Legacy_Utils::getUid());
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:11,代码来源:UserDeleteAction.class.php

示例4: getClientFeed

 /**
  * getClientFeed    Legacy_ActivityClient.{dirname}.GetClientFeed
  *
  * @param mixed     &$list
  *  string[]    $list['title']  entry's title
  *  string[]    $list['link']   link to entry
  *  string[]    $list['id']     entry's id(=permalink to entry)
  *  int[]       $list['updated']    unixtime
  *  int[]       $list['published']  unixtime
  *  string[]    $list['author']
  *  string[]    $list['content']
  * @param string    $dirname    client module's dirname
  * @param string    $dataname   client module's dataname(tablename)
  * @param int       $dataId     client module's primary key
  *
  * @return  void
  */
 public static function getClientFeed(&$list, $dirname, $dataname, $dataId)
 {
     $handler = Legacy_Utils::getModuleHandler($dataname, $dirname);
     if (!$handler) {
         return;
     }
     //setup client module info
     $obj = $handler->get($dataId);
     $list['title'] = $obj->get('title');
     $list['link'] = Legacy_Utils::renderUri($dirname, $dataname, $dataId);
     $list['id'] = Legacy_Utils::renderUri($dirname, $dataname, $dataId);
     $list['published'] = $obj->get('posttime');
     $list['updated'] = $obj->get('updatetime');
     $list['author'] = Legacy_Utils::getUserName($obj->get('uid'));
     $list['content'] = null;
 }
开发者ID:naao,项目名称:xcforum_proto,代码行数:33,代码来源:ActivityClient.class.php

示例5: getPlace

 /**
  * getPlace
  * 
  * @param	string $key		id/title/uri
  * 
  * @return	mixed
  *	  $place['id']		int
  *	  $place['title']	string
  *	  $place['uri']		string
  */
 public function getPlace($key = null)
 {
     if ($this->get('group_id') > 0) {
         $this->loadGroup();
         $place = array('id' => $this->get('group_id'), 'title' => $this->mGroup->getShow('title'), 'uri' => Legacy_Utils::renderUri($this->getDirname, 'group', $this->get('group_id')));
     } elseif ($this->get('conv_id') > 0) {
         $place = array('id' => $this->get('conv_id'), 'title' => $this->mConv->getShow('title'), 'uri' => Legacy_Utils::renderUri($this->getDirname, 'conv', $this->get('group_id')));
     } else {
         $place = array('id' => $this->get('uid'), 'title' => Legacy_Utils::getUserName($this->get('uid')), 'uri' => Legacy_Utils::renderUri($this->getDirname, 'player', $this->get('uid')));
     }
     return $key === null ? $place : $place[$key];
 }
开发者ID:kilica,项目名称:playermap,代码行数:22,代码来源:Log.class.php


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