public function getAllSubordinates($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$result = [];
		$conditions = [];
		$contain = [];
		if (!empty($guid)) {
			$conditions[$this->Employee->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
			$contain[] = 'Employee';
		}
		$fields = [
			$this->alias . '.id',
			$this->alias . '.parent_id',
			$this->alias . '.lft',
			$this->alias . '.rght',
			$this->alias . '.name',
		];
		$order = [
			$this->alias . '.id' => 'asc',
		];
		$result = $this->find('all', compact('fields', 'conditions', 'order', 'limit', 'contain'));

		return $result;
	}
public function getAllSubordinates($guid = null, $limit = CAKE_LDAP_SYNC_AD_LIMIT) {
		$result = [];
		$conditions = [];
		$contain = [];
		if (!empty($guid)) {
			$conditions[$this->Employee->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID] = $guid;
			$contain[] = 'Employee';
		}
		$fields = [
			$this->alias . '.id',
			$this->alias . '.parent_id',
			$this->alias . '.lft',
			$this->alias . '.rght',
			$this->alias . '.name',
		];
		$order = [
			$this->alias . '.id' => 'asc',
		];
		$result = $this->find('all', compact('fields', 'conditions', 'order', 'limit', 'contain'));

		return $result;
	}
public function getAllSubordinates ( $ guid = null , $ limit = CAKE_LDAP_SYNC_AD_LIMIT ) { $ result = [ ] ; $ conditions = [ ] ; $ contain = [ ] ; if ( ! empty ( $ guid ) ) { $ conditions [ $ this -> Employee -> alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID ] = $ guid ; $ contain [ ] = 'Employee' ; } $ fields = [ $ this -> alias . '.id' , $ this -> alias . '.parent_id' , $ this -> alias . '.lft' , $ this -> alias . '.rght' , $ this -> alias . '.name' , ] ; $ order = [ $ this -> alias . '.id' => 'asc' , ] ; $ result = $ this -> find ( 'all' , compact ( 'fields' , 'conditions' , 'order' , 'limit' , 'contain' ) ) ; return $ result ; }
Return array information of all subordinate employees

@param string $guid GUID of employee
@param int|string $limit Limit for result
@return array|null Return array of informationa about a employees,
or Null if no result.
Return array information of all subordinate employees