apps/user_ldap/lib/Command/TestConfig.php
/**
	 * tests the specified connection
	 * @param string $configID
	 * @return int
	 */
tests the specified connection
@param string $configID
@return int
tests the specified connection @param string $configID @return int
protected function testConfig($configID) {
		$lw = new \OCA\User_LDAP\LDAP();
		$connection = new Connection($lw, $configID);
		$connection->getConfiguration();
		if(!$connection->setConfiguration(array(
			'ldap_configuration_active' => 1,
		))) {
			return 1;
		}
		if($connection->bind()) {
			return 0;
		}
		return 2;
	}
protected function testConfig ( $ configID ) { $ lw = new \ OCA \ User_LDAP \ LDAP ( ) ; $ connection = new Connection ( $ lw , $ configID ) ; $ connection -> getConfiguration ( ) ; if ( ! $ connection -> setConfiguration ( array ( 'ldap_configuration_active' => 1 , ) ) ) { return 1 ; } if ( $ connection -> bind ( ) ) { return 0 ; } return 2 ; }
tests the specified connection
 @param string $configID
 @return int
tests the specified connection @param string $configID @return int
//ensure validation is run before we attempt the bind