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


PHP CUser::FormatName方法代码示例

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


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

示例1: fillFilterReferenceColumn

 public static function fillFilterReferenceColumn(&$filterElement, Entity\ReferenceField $field)
 {
     if ($field->GetDataType() == 'Bitrix\\Main\\User') {
         // USER
         if ($filterElement['value']) {
             $res = CUser::GetByID($filterElement['value']);
             $user = $res->fetch();
             if ($user) {
                 $username = CUser::FormatName(CSite::GetNameFormat(false), $user, true);
                 $filterElement['value'] = array('id' => $user['ID'], 'name' => $username);
             } else {
                 $filterElement['value'] = array('id' => $filterElement['value'], 'name' => GetMessage('REPORT_USER_NOT_FOUND'));
             }
         } else {
             $filterElement['value'] = array('id' => '');
         }
     } else {
         if ($field->GetDataType() == 'Bitrix\\Socialnetwork\\Workgroup') {
             // GROUP
             if ($filterElement['value']) {
                 $group = CSocNetGroup::GetByID($filterElement['value']);
                 if ($group) {
                     $filterElement['value'] = array(array('id' => $group['ID'], 'title' => $group['NAME']));
                 } else {
                     $filterElement['value'] = array(array('id' => $filterElement['value'], 'title' => GetMessage('REPORT_PROJECT_NOT_FOUND')));
                 }
             } else {
                 $filterElement['value'] = array(array('id' => ''));
             }
         }
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:32,代码来源:report_helper.php

示例2: GetFormatedUserName

	public static function GetFormatedUserName($userId)
	{
		static $userCache = array();

		$userId = IntVal($userId);

		if($userId > 0)
		{
			if (!isset($userCache[$userId]) || !is_array($userCache[$userId]))
			{
				$dbUser = CUser::GetByID($userId);
				if ($arUser = $dbUser->Fetch())
				{
					$userCache[$userId] = CUser::FormatName(
							CSite::GetNameFormat(false),
							array(
								"NAME" => $arUser["NAME"],
								"LAST_NAME" => $arUser["LAST_NAME"],
								"SECOND_NAME" => $arUser["SECOND_NAME"],
								"LOGIN" => $arUser["LOGIN"]
							),
							true
						);
				}
			}
		}

		return $userCache[$userId];
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:29,代码来源:mobile_order.php

示例3: Execute

 public function Execute()
 {
     if (!CModule::IncludeModule("forum")) {
         return CBPActivityExecutionStatus::Closed;
     }
     if (!CModule::IncludeModule("iblock")) {
         return CBPActivityExecutionStatus::Closed;
     }
     $forumId = intval($this->ForumId);
     if ($forumId <= 0) {
         return CBPActivityExecutionStatus::Closed;
     }
     $rootActivity = $this->GetRootActivity();
     $documentId = $rootActivity->GetDocumentId();
     $iblockId = $this->IBlockId;
     $dbResult = CIBlockElement::GetProperty($iblockId, $documentId[2], false, false, array("CODE" => "FORUM_TOPIC_ID"));
     $arResult = $dbResult->Fetch();
     if (!$arResult) {
         $obProperty = new CIBlockProperty();
         $obProperty->Add(array("IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "PROPERTY_TYPE" => "N", "MULTIPLE" => "N", "NAME" => "Forum topic", "CODE" => "FORUM_TOPIC_ID"));
         $obProperty->Add(array("IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "PROPERTY_TYPE" => "N", "MULTIPLE" => "N", "NAME" => "Forum message count", "CODE" => "FORUM_MESSAGE_CNT"));
         $dbResult = CIBlockElement::GetProperty($iblockId, $documentId[2], false, false, array("CODE" => "FORUM_TOPIC_ID"));
         $arResult = $dbResult->Fetch();
     }
     $forumTopicId = intval($arResult["VALUE"]);
     $arForumUserTmp = $this->ForumUser;
     $arForumUser = CBPHelper::ExtractUsers($arForumUserTmp, $documentId, true);
     $forumUserId = 1;
     $forumUserName = "Admin";
     if ($arForumUser != null) {
         $forumUserId = $arForumUser;
         $dbResult = CUser::GetByID($forumUserId);
         if ($arResult = $dbResult->Fetch()) {
             $forumUserName = CUser::FormatName(COption::GetOptionString("bizproc", "name_template", CSite::GetNameFormat(false), SITE_ID), $arResult, true);
         }
     }
     $newTopic = "N";
     if ($forumTopicId <= 0) {
         $documentService = $this->workflow->GetService("DocumentService");
         $document = $documentService->GetDocument($documentId);
         $newTopic = "Y";
         $arFields = array("TITLE" => $document["NAME"], "FORUM_ID" => $forumId, "USER_START_ID" => $forumUserId, "USER_START_NAME" => $forumUserName, "LAST_POSTER_NAME" => $forumUserName, "APPROVED" => "Y");
         $forumTopicId = CForumTopic::Add($arFields);
         CIBlockElement::SetPropertyValues($documentId[2], $iblockId, $forumTopicId, "FORUM_TOPIC_ID");
     }
     $arFields = array("POST_MESSAGE" => $this->ForumPostMessage, "AUTHOR_ID" => $forumUserId, "AUTHOR_NAME" => $forumUserName, "FORUM_ID" => $forumId, "TOPIC_ID" => $forumTopicId, "APPROVED" => "Y", "NEW_TOPIC" => $newTopic, "PARAM2" => $documentId[2]);
     $forumMessageId = CForumMessage::Add($arFields, false, array("SKIP_INDEXING" => "Y", "SKIP_STATISTIC" => "N"));
     return CBPActivityExecutionStatus::Closed;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:49,代码来源:forumreviewactivity.php

示例4: getRelatedUser

 function getRelatedUser($firstUserID, $relationID)
 {
     $arRel = CSocNetUserRelations::GetByID($relationID);
     if ($arRel) {
         $secondUserID = $firstUserID == $arRel["FIRST_USER_ID"] ? $arRel["SECOND_USER_ID"] : $arRel["FIRST_USER_ID"];
         $dbUser = CUser::GetByID($secondUserID);
         if ($arUser = $dbUser->Fetch()) {
             return CUser::FormatName(CSite::GetNameFormat(false), $arUser, true);
         } else {
             return false;
         }
     } else {
         false;
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:15,代码来源:component.php

示例5: prepareData

 protected function prepareData()
 {
     if (strlen(trim($this->arParams["NAME_TEMPLATE"])) <= 0) {
         $this->arParams["NAME_TEMPLATE"] = \CSite::GetNameFormat();
     }
     $dbPost = \CBlogPost::GetList(array(), array("ID" => $this->arParams["postId"]), false, false, array("ID", "BLOG_ID", "PUBLISH_STATUS", "TITLE", "AUTHOR", "ENABLE_COMMENTS", "NUM_COMMENTS", "VIEWS", "CODE", "MICRO", "DETAIL_TEXT", "DATE_PUBLISH", "CATEGORY_ID", "HAS_SOCNET_ALL", "HAS_TAGS", "HAS_IMAGES", "HAS_PROPS", "HAS_COMMENT_IMAGES"));
     if ($arPost = $dbPost->Fetch()) {
         if (strlen($arPost['TITLE']) > 30) {
             $arPost['TITLE'] = substr($arPost['TITLE'], 0, 30) . "...";
         }
         $this->arResult['POST'] = $arPost;
         $this->arResult['POST']['PUBLISH_STATUS_DESCRIPTION'] = Loc::getMessage('BLOG_POST_PUBLISH_STATUS_' . $arPost['PUBLISH_STATUS']);
         $this->arResult['POST']['AUTHOR_FORMATTED_NAME'] = \CUser::FormatName($this->arParams['NAME_TEMPLATE'], array('LOGIN' => $this->arResult['POST']['LOGIN'], 'NAME' => $this->arResult['POST']['NAME'], 'LAST_NAME' => $this->arResult['POST']['LAST_NAME']), true, false);
         $this->arResult["POST"]['AUTHOR_PROFILE'] = \CComponentEngine::MakePathFromTemplate($this->arParams["PATH_TO_USER_PROFILE"], array("user_id" => $this->arResult['POST']['AUTHOR']));
         $this->arResult["POST"]['AUTHOR_UNIQID'] = 'u_' . $this->randString();
         if (defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS['CACHE_MANAGER']->RegisterTag('blog_post_' . $this->arParams['postId']);
         }
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:20,代码来源:class.php

示例6: __format_user4search

 function __format_user4search($userID = null, $nameTemplate = "")
 {
     global $USER;
     if ($userID == null) {
         $userID = $USER->GetID();
     }
     if (empty($nameTemplate)) {
         $nameTemplate = CSite::GetNameFormat(false);
     }
     $rUser = CUser::GetByID($userID);
     if ($rUser && ($arUser = $rUser->Fetch())) {
         $userName = CUser::FormatName($nameTemplate . ' [#ID#]', $arUser);
         if (!(strlen($arUser['NAME']) > 0 || strlen($arUser['LAST_NAME']) > 0)) {
             $userName .= ' [' . $arUser['ID'] . ']';
         }
     } else {
         $userName = '';
     }
     return $userName;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:20,代码来源:functions.php

示例7: getEvent

 protected static function getEvent($arParams)
 {
     global $USER;
     $arEvents = CCalendarEvent::GetList(array('arFilter' => array("ID" => $arParams['ID'], "DELETED" => "N"), 'parseRecursion' => true, 'fetchAttendees' => true, 'checkPermissions' => true));
     if (is_array($arEvents) && count($arEvents) > 0) {
         $arEvent = $arEvents[0];
         if ($arEvent['IS_MEETING']) {
             $arGuests = $arEvent['~ATTENDEES'];
             $arEvent['GUESTS'] = array();
             foreach ($arGuests as $guest) {
                 $arEvent['GUESTS'][] = array('id' => $guest['USER_ID'], 'name' => CUser::FormatName(CSite::GetNameFormat(null, $arParams['SITE_ID']), $guest, true), 'status' => $guest['STATUS'], 'accessibility' => $guest['ACCESSIBILITY'], 'bHost' => $guest['USER_ID'] == $arEvent['MEETING_HOST']);
                 if ($guest['USER_ID'] == $USER->GetID()) {
                     $arEvent['STATUS'] = $guest['STATUS'];
                 }
             }
         }
         $set = CCalendar::GetSettings();
         $url = str_replace('#user_id#', $arEvent['CREATED_BY'], $set['path_to_user_calendar']) . '?EVENT_ID=' . $arEvent['ID'];
         return array('ID' => $arEvent['ID'], 'NAME' => $arEvent['NAME'], 'DETAIL_TEXT' => $arEvent['DESCRIPTION'], 'DATE_FROM' => $arEvent['DT_FROM'], 'DATE_TO' => $arEvent['DT_TO'], 'ACCESSIBILITY' => $arEvent['ACCESSIBILITY'], 'IMPORTANCE' => $arEvent['IMPORTANCE'], 'STATUS' => $arEvent['STATUS'], 'IS_MEETING' => $arEvent['IS_MEETING'] ? 'Y' : 'N', 'GUESTS' => $arEvent['GUESTS'], 'UF_WEBDAV_CAL_EVENT' => $arEvent['UF_WEBDAV_CAL_EVENT'], 'URL' => $url);
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:21,代码来源:calendar_event_handlers.php

示例8: GetUserName

 function GetUserName($USER_ID, $nameTemplate = "")
 {
     $ar_res = false;
     if (IntVal($USER_ID) > 0) {
         $db_res = CUser::GetByID(IntVal($USER_ID));
         $ar_res = $db_res->Fetch();
     }
     if (!$ar_res) {
         $db_res = CUser::GetByLogin($USER_ID);
         $ar_res = $db_res->Fetch();
     }
     $USER_ID = IntVal($ar_res["ID"]);
     $f_LOGIN = htmlspecialcharsex($ar_res["LOGIN"]);
     $forum_user = CForumUser::GetByUSER_ID($USER_ID);
     if ($forum_user["SHOW_NAME"] == "Y" && (strlen(trim($ar_res["NAME"])) > 0 || strlen(trim($ar_res["LAST_NAME"])) > 0)) {
         $nameTemplate = trim(empty($nameTemplate)) ? CSite::GetNameFormat() : $nameTemplate;
         return trim(CUser::FormatName($nameTemplate, array("NAME" => htmlspecialcharsEx($ar_res["NAME"]), "LAST_NAME" => htmlspecialcharsEx($ar_res["LAST_NAME"]), "SECOND_NAME" => htmlspecialcharsEx($ar_res["SECOND_NAME"]))));
     } else {
         return $f_LOGIN;
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:21,代码来源:component.php

示例9: prepareUserNames

 protected static function prepareUserNames(array $userIDs)
 {
     if (empty($userIDs)) {
         return array();
     }
     $results = array();
     foreach ($userIDs as $k => $v) {
         if (isset(self::$userNames[$v])) {
             $results[$v] = self::$userNames[$v];
             unset($userIDs[$v]);
         }
     }
     if (!empty($userIDs)) {
         $dbResult = \CUser::GetList($by = 'ID', $order = 'ASC', array('ID' => implode('||', $userIDs)), array('FIELDS' => array('ID', 'NAME', 'LAST_NAME', 'SECOND_NAME', 'LOGIN', 'TITLE')));
         $format = \CSite::GetNameFormat(false);
         while ($user = $dbResult->Fetch()) {
             $userID = (int) $user['ID'];
             $results[$userID] = \CUser::FormatName($format, $user, true, false);
         }
     }
     return $results;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:22,代码来源:dealdatasource.php

示例10: __CrmQuickPanelViewPrepareResponsible

 function __CrmQuickPanelViewPrepareResponsible($entityFields, $userProfilePath, $nameTemplate, $enableEdit, $editorID, $serviveUrl, $key = '', $useTildeKey = true)
 {
     if ($key === '') {
         $key = 'ASSIGNED_BY';
     }
     $map = array('ID' => ($useTildeKey ? '~' : '') . $key . '_ID', 'FORMATTED_NAME' => ($useTildeKey ? '~' : '') . $key . '_FORMATTED_NAME', 'LOGIN' => ($useTildeKey ? '~' : '') . $key . '_LOGIN', 'NAME' => ($useTildeKey ? '~' : '') . $key . '_NAME', 'LAST_NAME' => ($useTildeKey ? '~' : '') . $key . '_LAST_NAME', 'SECOND_NAME' => ($useTildeKey ? '~' : '') . $key . '_SECOND_NAME', 'PERSONAL_PHOTO' => ($useTildeKey ? '~' : '') . $key . '_PERSONAL_PHOTO', 'WORK_POSITION' => ($useTildeKey ? '~' : '') . $key . '_WORK_POSITION');
     $userID = isset($entityFields[$map['ID']]) ? $entityFields[$map['ID']] : 0;
     $formattedName = isset($entityFields[$map['FORMATTED_NAME']]) ? $entityFields[$map['FORMATTED_NAME']] : '';
     if ($formattedName === '') {
         $formattedName = CUser::FormatName($nameTemplate, array('LOGIN' => isset($entityFields[$map['LOGIN']]) ? $entityFields[$map['LOGIN']] : '', 'NAME' => isset($entityFields[$map['NAME']]) ? $entityFields[$map['NAME']] : '', 'LAST_NAME' => isset($entityFields[$map['LAST_NAME']]) ? $entityFields[$map['LAST_NAME']] : '', 'SECOND_NAME' => isset($entityFields[$map['SECOND_NAME']]) ? $entityFields[$map['SECOND_NAME']] : ''), true, false);
     }
     $photoID = isset($entityFields[$map['PERSONAL_PHOTO']]) ? $entityFields[$map['PERSONAL_PHOTO']] : 0;
     $photoUrl = '';
     if ($photoID > 0) {
         $file = new CFile();
         $fileInfo = $file->ResizeImageGet($photoID, array('width' => 38, 'height' => 38), BX_RESIZE_IMAGE_EXACT);
         if (is_array($fileInfo) && isset($fileInfo['src'])) {
             $photoUrl = $fileInfo['src'];
         }
     }
     return array('type' => 'responsible', 'enableCaption' => false, 'editable' => $enableEdit, 'data' => array('fieldID' => $useTildeKey ? substr($map['ID'], 1) : $map['ID'], 'userID' => $userID, 'name' => $formattedName, 'photoID' => $photoID, 'photoUrl' => $photoUrl, 'position' => isset($entityFields[$map['WORK_POSITION']]) ? $entityFields[$map['WORK_POSITION']] : '', 'profileUrlTemplate' => $userProfilePath, 'profileUrl' => CComponentEngine::makePathFromTemplate($userProfilePath, array('user_id' => $userID)), 'editorID' => $editorID, 'serviceUrl' => $serviveUrl, 'userInfoProviderID' => md5($serviveUrl)));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:22,代码来源:component.php

示例11: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
CUtil::InitJSCore(array('taskQuickPopups'));
$loggedInUserId = (int) $GLOBALS['USER']->GetID();
$loggedInUserFormattedName = '';
$rsUser = CUser::GetList($by = 'ID', $order = 'ASC', array('ID' => $loggedInUserId), array('FIELDS' => array('NAME', 'LAST_NAME', 'SECOND_NAME', 'LOGIN')));
if ($arUser = $rsUser->Fetch()) {
    $loggedInUserFormattedName = CUser::FormatName(CSite::GetNameFormat(false), array('NAME' => $arUser['NAME'], 'LAST_NAME' => $arUser['LAST_NAME'], 'SECOND_NAME' => $arUser['SECOND_NAME'], 'LOGIN' => $arUser['LOGIN']), $bUseLogin = true, $bHtmlSpecialChars = false);
}
ob_start();
?>
	<div class="task-filter-popup" id="task-filter-popup" style="display: block;">
		<div class="task-filter-popup-header">
			<div class="task-filter-popup-name"><?php 
echo GetMessage('TASKS_FILTERV2_CONSTRUCTOR_FILTER_TITLE');
?>
</div>
			<div class="task-filter-popup-inp-wrap">
				<input type="text" value="" id="tasks-filter-name" class="task-filter-popup-inp"
					onkeyup="BX.Tasks.filterV2.engine.setFilterName({},this.value,{renderer : {skipRender: true}});"
					onchange="BX.Tasks.filterV2.engine.setFilterName({},this.value,{renderer : {skipRender: true}});">
			</div>
		</div>
		<div id="task-filter-popup-root-level" class="task-filter-popup-items-wrap task-filter-and"></div>
	</div>
<?php 
$html = ob_get_clean();
$href = '';
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例12: GetMessage

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$arUser = $arParams['~USER'];
$name = CUser::FormatName($arParams['NAME_TEMPLATE'], $arUser, $arResult["bUseLogin"]);
$user_action_menu_number = rand();
?>
<div class="department-manager">
	<div class="department-titles"><?php 
echo GetMessage("INTR_STR_UF_HEAD");
?>
</div>
		<span class="department-manager-info-block">
			<a class="department-manager-avatar" href="<?php 
echo $arUser['DETAIL_URL'];
?>
">
				<?php 
if (!empty($arUser["PERSONAL_PHOTO"])) {
    ?>
<img src="<?php 
    echo $arUser["PERSONAL_PHOTO"];
    ?>
"/><?php 
}
?>
			</a>
			<span class="department-manager-name-block">
				<div class="department-manager-name">
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例13: switch

                ?>
		<td><?php 
                switch ($key) {
                    case 'FULL_NAME':
                        if (true) {
                            ?>
					<div class="bx-user-name">
					<?php 
                            $APPLICATION->IncludeComponent("bitrix:main.user.link", '', array("ID" => $arUser["ID"], "HTML_ID" => "system_person_" . $arUser["ID"], "NAME" => $arUser["NAME"], "LAST_NAME" => $arUser["LAST_NAME"], "SECOND_NAME" => $arUser["SECOND_NAME"], "LOGIN" => $arUser["LOGIN"], "USE_THUMBNAIL_LIST" => "N", "INLINE" => "Y", "IS_ONLINE" => $arUser["IS_ONLINE"], "PROFILE_URL" => $arUser["DETAIL_URL"], "PATH_TO_SONET_MESSAGES_CHAT" => $arParams["PM_URL"], "DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"], "SHOW_YEAR" => $arParams["SHOW_YEAR"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"], "SHOW_LOGIN" => $arParams["SHOW_LOGIN"], "PATH_TO_CONPANY_DEPARTMENT" => $arParams["~PATH_TO_CONPANY_DEPARTMENT"], "PATH_TO_VIDEO_CALL" => $arParams["~PATH_TO_VIDEO_CALL"]), false, array("HIDE_ICONS" => "Y"));
                            ?>
					</div>
					<?php 
                            $result = '';
                        } else {
                            $bUseLogin = $arParams['SHOW_LOGIN'] != "N" ? true : false;
                            $result = '<a href="' . $arUser['DETAIL_URL'] . '">' . CUser::FormatName($arParams['NAME_TEMPLATE'], $arUser, $bUseLogin) . '</a>';
                        }
                        break;
                    case 'EMAIL':
                        $result = '<a href="mailto:' . urlencode($arUser[$key]) . '">' . htmlspecialcharsbx($arUser[$key]) . '</a>';
                        break;
                    case 'PERSONAL_WWW':
                        $result = '<a href="http://' . urlencode($arUser[$key]) . '" target="_blank">' . htmlspecialcharsbx($arUser[$key]) . '</a>';
                        break;
                    case 'PERSONAL_GENDER':
                        $result = $arUser[$key] == 'F' ? GetMessage('INTR_ISL_TPL_GENDER_F') : ($arUser[$key] == 'M' ? GetMessage('INTR_ISL_TPL_GENDER_M') : '');
                        break;
                    case 'PERSONAL_PHOTO':
                        if (!$arUser[$key]) {
                            $result = '<div class="bx-user-image-default-100"></div>';
                        } else {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例14: InitUserTmp

	public static function InitUserTmp($userID, $arParams, $bCurrentUserIsAdmin = "unknown", $bRSS = false)
	{
		$title = "";
		$message = "";
		$bUseLogin = $arParams['SHOW_LOGIN'] != "N" ? true : false;

		$dbUser = CUser::GetByID($userID);
		if ($arUser = $dbUser->Fetch())
		{
			if ($bCurrentUserIsAdmin == "unknown")
				$bCurrentUserIsAdmin = CSocNetUser::IsCurrentUserModuleAdmin();

			$canViewProfile = CSocNetUserPerms::CanPerformOperation($GLOBALS["USER"]->GetID(), $arUser["ID"], "viewprofile", $bCurrentUserIsAdmin);
			$pu = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arUser["ID"]));

			if (!$bRSS && $canViewProfile)
				$title .= "<a href=\"".$pu."\">";
			$title .= CUser::FormatName($arParams['NAME_TEMPLATE'], $arUser, $bUseLogin);
			if (!$bRSS && $canViewProfile)
				$title .= "</a>";

			if (intval($arUser["PERSONAL_PHOTO"]) <= 0)
			{
				switch ($arUser["PERSONAL_GENDER"])
				{
					case "M":
						$suffix = "male";
						break;
					case "F":
						$suffix = "female";
							break;
					default:
						$suffix = "unknown";
				}
				$arUser["PERSONAL_PHOTO"] = COption::GetOptionInt("socialnetwork", "default_user_picture_".$suffix, false, SITE_ID);
			}
			$arImage = CSocNetTools::InitImage($arUser["PERSONAL_PHOTO"], 100, "/bitrix/images/socialnetwork/nopic_user_100.gif", 100, $pu, $canViewProfile);

			$message = $arImage["IMG"];
		}

		return array($title, $message);
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:43,代码来源:log.php

示例15: array

			$arUserList = array();
			$strNameFormat = CSite::GetNameFormat(true);

			$byUser = 'ID';
			$orderUser = 'ASC';
			$rsUsers = CUser::GetList(
				$byUser,
				$orderUser,
				array('ID' => implode(' || ', array_keys($userListID))),
				array('FIELDS' => array('ID', 'LOGIN', 'NAME', 'LAST_NAME', 'SECOND_NAME'))
			);
			while ($arOneUser = $rsUsers->Fetch())
			{
				$arOneUser['ID'] = (int)$arOneUser['ID'];
				$arUserList[$arOneUser['ID']] = '<a href="/bitrix/admin/user_edit.php?lang='.LANGUAGE_ID.'&ID='.$arOneUser['ID'].'">'.CUser::FormatName($strNameFormat, $arOneUser).'</a>';
			}
			if (isset($arUserList[$clearQuantityUser]))
				$strQuantityUser = $arUserList[$clearQuantityUser];
			if (isset($arUserList[$clearQuantityReservedUser]))
				$strQuantityReservedUser = $arUserList[$clearQuantityReservedUser];
			if (isset($arUserList[$clearStoreUser]))
				$strStoreUser = $arUserList[$clearStoreUser];
		}
		$boolStoreExists = false;
		$arStores = array();
		$arStores[] = array("ID" => -1, "ADDRESS" => Loc::getMessage("CAT_ALL_STORES"));
		$rsStores = CCatalogStore::GetList(
			array('SORT' => 'ASC', 'ID' => 'ASC'),
			array('ACTIVE' => 'Y'),
			false,
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:30,代码来源:options.php


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