Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add getById method to User class
  • Loading branch information
Денис committed Nov 20, 2020
commit a938c737f32e74eaa15ac115b9c88d63394f0edb
16 changes: 16 additions & 0 deletions src/classes/user/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ public function fields()
return $result;
}

/**
* Get user by id
* @link http://dev.1c-bitrix.ru/rest_help/users/user_get.php
* @throws Bitrix24Exception
* @param $id - user id
* @return array
*/
public function getById($id) {
$result = $this->client->call('user.get',
array(
'ID' => $id,
)
);
return $result;
}

/**
* Get list of users
* @link http://dev.1c-bitrix.ru/rest_help/users/user_get.php
Expand Down