Deletes an entry on the current LDAP directory.

@param string $dn

@return bool
559262
public function delete($dn)
    {
        if ($this->suppressErrors) {
            return @ldap_delete($this->getConnection(), $dn);
        }

        return ldap_delete($this->getConnection(), $dn);
    }
118414
public function read($dn)
	{
		$base = substr($dn, strpos($dn, ',') + 1);
		$cn = substr($dn, 0, strpos($dn, ','));
		$result = @ldap_read($this->resource, $base, $cn);

		if ($result)
		{
			return @ldap_get_entries($this->resource, $result);
		}
		else
		{
			return $result;
		}
	}
766842
public function delete($key)
    {
        $role   =   $this->findByKey($key);
        if (! isset($role)) {
            return true;
        }

        return $role->delete();
    }
203430
public function rmdirr($dirname)
    {
        // Sanity check
        if (!$this->file_exists($dirname)) {
            return false;
        }

        // Simple delete for a file
        if ($this->is_file($dirname) || $this->is_link($dirname)) {
            return $this->unlink($dirname);
        }

        // Loop through the folder
        $dir = $this->dir($dirname);
        while (false !== $entry = $dir->read()) {
            // Skip pointers
            if ($entry == '.' || $entry == '..') {
                continue;
            }
            // Recurse
            $this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry);
        }

        // Clean up
        $dir->close();
        return $this->rmdir($dirname);
    }
236813
function delete_group($group_id)
    {
        $group_cache = $this->_fetch_groups();
        $del_dn      = $group_cache[$group_id]['dn'];

        if (!$this->ldap->delete_entry($del_dn)) {
            $this->set_error(self::ERROR_SAVING, 'errorsaving');
            return false;
        }

        if ($this->cache) {
            unset($group_cache[$group_id]);
            $this->cache->set('groups', $group_cache);
        }

        return true;
    }
1059571
public function removeFolder( $dirName )
	{
		if( !$this->numFolders )
			return FALSE;
		foreach( $this->folders as $key => $information )
		{
			if( $information['name'] !== $dirName )
				continue;
			$this->numFolders--;
			unset( $this->folders[$key] );
			return TRUE;
		}
	}
1321884
public function add($dn, array $entry)
    {
        if ($this->suppressErrors) {
            return @ldap_add($this->getConnection(), $dn, $entry);
        }

        return ldap_add($this->getConnection(), $dn, $entry);
    }
69605
public function can_delete_instance($instance) {
        $context = context_course::instance($instance->courseid);
        if (!has_capability('enrol/ldap:manage', $context)) {
            return false;
        }

        if (!enrol_is_enabled('ldap')) {
            return true;
        }

        if (!$this->get_config('ldap_host') or !$this->get_config('objectclass') or !$this->get_config('course_idnumber')) {
            return true;
        }

        // TODO: connect to external system and make sure no users are to be enrolled in this course
        return false;
    }
14679
public function userUsernameFromDn($dn) {

    $ldap_entry = @$this->dnExists($dn, 'ldap_entry', array());
    if (!$ldap_entry || !is_array($ldap_entry)) {
      return FALSE;
    }
    else {
      return $this->userUsernameFromLdapEntry($ldap_entry);
    }

  }
601815
public function delete($ean)
	{
		$endpoint = new Delete($this->getTransport());
		$endpoint->setId($ean);

		$result = $endpoint->performRequest();

		return $result['status'] == 204;
	}
641402
public function modReplace($dn, array $entry)
    {
        if ($this->suppressErrors) {
            return @ldap_mod_replace($this->getConnection(), $dn, $entry);
        }

        return ldap_mod_replace($this->getConnection(), $dn, $entry);
    }
1196233
def delete(self, using=None):
        
        using = using or router.db_for_write(self.__class__, instance=self)
        connection = connections[using]
        logger.debug("Deleting LDAP entry %s" % self.dn)
        connection.delete_s(self.dn)
        signals.post_delete.send(sender=self.__class__, instance=self)
798940
public function delete( $drilldown = false ) : bool
    {
        if ( is_file( $this->path ) ){
            return @unlink( $this->path );
        }
        if ( $drilldown ){
            return self::removeDirectoryRecursive( $this->path );
        }
        return @rmdir( $this->path );
    }
1093771
public function deleteDirectory($dirname)
    {
        $dirpath = $this->path() . '/' . $dirname;
        
        if (is_dir($dirpath)) {
            ToolboxºFileTools::emptyDir($dirpath);
        }
    }
1292930
def delete(self, dn: str) -> None:
        

        return self._do_with_retry(lambda obj: obj.delete_s(dn))
972548
public function delete(LdapObject $ldapObject, $recursively = false)
    {
        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_BEFORE_DELETE, $ldapObject));
        $this->validateObject($ldapObject);

        $operation = new DeleteOperation($ldapObject->get('dn'));
        if ($recursively) {
            $operation->addControl((new LdapControl(LdapControlOid::SubTreeDelete))->setCriticality(true));
        }

        $this->connection->execute($operation);
        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_AFTER_DELETE, $ldapObject));
    }
644242
public function delete($dn)
    {
        $this->adldap->utilities()->validateNotNullOrEmpty('Distinguished Name [dn]', $dn);

        return $this->connection->delete($dn);
    }