booked/WebServices/UsersWebService.php
/**
	 * @name GetAllUsers
	 * @description Loads all users that the current user can see.
	 * Optional query string parameters: username, email, firstName, lastName, phone, organization, position and any custom attributes.
	 * If searching on custom attributes, the query string parameter has to be in the format att#=value.
	 * For example, Users/?att1=ExpectedAttribute1Value
	 * @response UsersResponse
	 * @return void
	 */
@name GetAllUsers
@description Loads all users that the current user can see.
Optional query string parameters: username, email, firstName, lastName, phone, organization, position and any custom attributes.
If searching on custom attributes, the query string parameter has to be in the format att#=value.
For example, Users/?att1=ExpectedAttribute1Value
@response UsersResponse
@return void
@name GetAllUsers @description Loads all users that the current user can see . Optional query string parameters : username email firstName lastName phone organization position and any custom attributes . If searching on custom attributes the query string parameter has to be in the format att# = value . For example Users / ?att1 = ExpectedAttribute1Value @response UsersResponse @return void
public function GetUsers()
	{
		$attributes = $this->attributeService->GetByCategory(CustomAttributeCategory::USER);
		$filter = $this->GetUserFilter($attributes);
		$repository = $this->repositoryFactory->Create($this->server->GetSession());
		$data = $repository->GetList(null, null, null, null, $filter->GetFilter(), AccountStatus::ACTIVE);
		$attributeLabels = array();
		foreach ($attributes as $attribute)
		{
			$attributeLabels[$attribute->Id()] = $attribute->Label();
		}
		$usersResponse = new UsersResponse($this->server, $data->Results(), $attributeLabels);
		unset($data);
		unset($attributeLabels);
		$this->server->WriteResponse($usersResponse);
	}
public function GetUsers ( ) { $ attributes = $ this -> attributeService -> GetByCategory ( CustomAttributeCategory :: USER ) ; $ filter = $ this -> GetUserFilter ( $ attributes ) ; $ repository = $ this -> repositoryFactory -> Create ( $ this -> server -> GetSession ( ) ) ; $ data = $ repository -> GetList ( null , null , null , null , $ filter -> GetFilter ( ) , AccountStatus :: ACTIVE ) ; $ attributeLabels = array ( ) ; foreach ( $ attributes as $ attribute ) { $ attributeLabels [ $ attribute -> Id ( ) ] = $ attribute -> Label ( ) ; } $ usersResponse = new UsersResponse ( $ this -> server , $ data -> Results ( ) , $ attributeLabels ) ; unset ( $ data ) ; unset ( $ attributeLabels ) ; $ this -> server -> WriteResponse ( $ usersResponse ) ; }
@name GetAllUsers
 @description Loads all users that the current user can see.
@name GetAllUsers @description Loads all users that the current user can see .