R
R
Rickkk2016-06-20 13:18:55
API
Rickkk, 2016-06-20 13:18:55

How to convert CDBResult object to CUser?

Hello!
I need to get his full name by user id in Bitrix.
I get an array of user data with the following API request

$rsUser = CUser::GetByID($user_id);
$arUser = $rsUser->Fetch();

The $arUser array contains separate fields for the full name, let's say I'm lazy to process them, because I know that CUser has a GetFullName method, which returns the full name.
How can I convert $rsUser of type CDBResult to CUser to call GetFullName without having to write my own bikes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Zakharov, 2016-06-20
@Rickkk

GetFullName returns the name of the current user, you can use bxapi.ru/src/?module_id=main&name=CUser::FormatName

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question