public function getListEmployeesManager($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$result = [];
		if (!$this->hasField('manager_id')) {
			return $result;
		}

		$conditions = [];
		if (!empty($guid)) {
			$conditions[$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
		}
		$fields = [
			$this->alias . '.id',
			$this->alias . '.manager_id',
			$this->alias . '.' . $this->displayField . ' AS name',
		];
		$order = [
			$this->alias . '.id' => 'asc',
		];
		$this->recursive = -1;
		$data = $this->find('all', compact('fields', 'conditions', 'order', 'limit'));
		if (empty($data)) {
			return $result;
		}

		$result = Hash::combine($data, '{n}.' . $this->alias . '.id', '{n}.' . $this->alias);

		return $result;
	}
public function getListEmployeesManager($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$result = [];
		if (!$this->hasField('manager_id')) {
			return $result;
		}

		$conditions = [];
		if (!empty($guid)) {
			$conditions[$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
		}
		$fields = [
			$this->alias . '.id',
			$this->alias . '.manager_id',
			$this->alias . '.' . $this->displayField . ' AS name',
		];
		$order = [
			$this->alias . '.id' => 'asc',
		];
		$this->recursive = -1;
		$data = $this->find('all', compact('fields', 'conditions', 'order', 'limit'));
		if (empty($data)) {
			return $result;
		}

		$result = Hash::combine($data, '{n}.' . $this->alias . '.id', '{n}.' . $this->alias);

		return $result;
	}
public function getListEmployeesManager ( $ guid = null , $ limit = CAKE_LDAP_SYNC_AD_LIMIT ) { $ result = [ ] ; if ( ! $ this -> hasField ( 'manager_id' ) ) { return $ result ; } $ conditions = [ ] ; if ( ! empty ( $ guid ) ) { $ conditions [ $ this -> alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID ] = $ guid ; } $ fields = [ $ this -> alias . '.id' , $ this -> alias . '.manager_id' , $ this -> alias . '.' . $ this -> displayField . ' AS name' , ] ; $ order = [ $ this -> alias . '.id' => 'asc' , ] ; $ this -> recursive = - 1 ; $ data = $ this -> find ( 'all' , compact ( 'fields' , 'conditions' , 'order' , 'limit' ) ) ; if ( empty ( $ data ) ) { return $ result ; } $ result = Hash :: combine ( $ data , '{n}.' . $ this -> alias . '.id' , '{n}.' . $ this -> alias ) ; return $ result ; }
Return list of managers for synchronization tree of
subordinate employees

@param string $guid GUID of manager
@param int|string $limit Limit for result
@return array Return list of managers.
Return list of managers for synchronization tree of subordinate employees