public function checkSearchBase($userGuid = null, $searchBase = null) {
		if (empty($searchBase)) {
			return false;
		}

		if (empty($userGuid)) {
			return $this->groupExists($searchBase);
		}

		$prevUseTable = $this->useTable;
		$this->useTable = $searchBase;
		$conditions = [CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_OBJECT_GUID => GuidStringToLdap($userGuid)];
		$fields = [CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME];
		$group = $this->find('first', compact('conditions', 'fields'));
		$this->useTable = $prevUseTable;
		if (empty($group)) {
			return false;
		}

		return true;
	}
public function checkSearchBase($userGuid = null, $searchBase = null) {
		if (empty($searchBase)) {
			return false;
		}

		if (empty($userGuid)) {
			return $this->groupExists($searchBase);
		}

		$prevUseTable = $this->useTable;
		$this->useTable = $searchBase;
		$conditions = [CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_OBJECT_GUID => GuidStringToLdap($userGuid)];
		$fields = [CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME];
		$group = $this->find('first', compact('conditions', 'fields'));
		$this->useTable = $prevUseTable;
		if (empty($group)) {
			return false;
		}

		return true;
	}
public function checkSearchBase ( $ userGuid = null , $ searchBase = null ) { if ( empty ( $ searchBase ) ) { return false ; } if ( empty ( $ userGuid ) ) { return $ this -> groupExists ( $ searchBase ) ; } $ prevUseTable = $ this -> useTable ; $ this -> useTable = $ searchBase ; $ conditions = [ CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_OBJECT_GUID => GuidStringToLdap ( $ userGuid ) ] ; $ fields = [ CAKE_SETTINGS_APP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME ] ; $ group = $ this -> find ( 'first' , compact ( 'conditions' , 'fields' ) ) ; $ this -> useTable = $ prevUseTable ; if ( empty ( $ group ) ) { return false ; } return true ; }
Check search base for user by GUID.

@param string $userGuid GUID of user.
@param string $searchBase Search base.
@return bool Success
Check search base for user by GUID .