本文整理汇总了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;
}
示例2: _getPagetitle
/**
* _getPageTitle
*
* @param void
*
* @return string
**/
protected function _getPagetitle()
{
return Legacy_Utils::getUserName($this->_getId());
}
示例3: _getPagetitle
/**
* _getPageTitle
*
* @param void
*
* @return string
**/
protected function _getPagetitle()
{
return Legacy_Utils::getUserName(Legacy_Utils::getUid());
}
示例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;
}
示例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];
}