public function deleteAdmin($login)
	{
		$login = urlencode($login);
		if (strlen($login) < 1) {
			throw new InvalidArgumentException("Login can't be empty");
		}

		try {
			$client = new CouchClient($this->client->dsn(), $this->usersdb);
			$doc = $client->getDoc("org.couchdb.user:" . $login);
			$client->deleteDoc($doc);
		} catch (Exception $e) {
			
		}

		$url = '/_node/' . urlencode($this->node) . '/_config/admins/' . urlencode($login);
		$raw = $this->client->query(
				"DELETE", $url
		);
		$resp = Couch::parseRawResponse($raw);
		if ($resp['status_code'] != 200) {
			throw new CouchException($raw);
		}
		return $resp["body"];
	}
public function deleteAdmin($login)
	{
		$login = urlencode($login);
		if (strlen($login) < 1) {
			throw new InvalidArgumentException("Login can't be empty");
		}

		try {
			$client = new CouchClient($this->client->dsn(), $this->usersdb);
			$doc = $client->getDoc("org.couchdb.user:" . $login);
			$client->deleteDoc($doc);
		} catch (Exception $e) {
			
		}

		$url = '/_node/' . urlencode($this->node) . '/_config/admins/' . urlencode($login);
		$raw = $this->client->query(
				"DELETE", $url
		);
		$resp = Couch::parseRawResponse($raw);
		if ($resp['status_code'] != 200) {
			throw new CouchException($raw);
		}
		return $resp["body"];
	}
public function deleteAdmin ( $ login ) { $ login = urlencode ( $ login ) ; if ( strlen ( $ login ) < 1 ) { throw new InvalidArgumentException ( "Login can't be empty" ) ; } try { $ client = new CouchClient ( $ this -> client -> dsn ( ) , $ this -> usersdb ) ; $ doc = $ client -> getDoc ( "org.couchdb.user:" . $ login ) ; $ client -> deleteDoc ( $ doc ) ; } catch ( Exception $ e ) { } $ url = '/_node/' . urlencode ( $ this -> node ) . '/_config/admins/' . urlencode ( $ login ) ; $ raw = $ this -> client -> query ( "DELETE" , $ url ) ; $ resp = Couch :: parseRawResponse ( $ raw ) ; if ( $ resp [ 'status_code' ] != 200 ) { throw new CouchException ( $ raw ) ; } return $ resp [ "body" ] ; }
Permanently removes a CouchDB Server administrator


@param string $login administrator login
@return stdClass CouchDB server response
@throws InvalidArgumentException|CouchException
Permanently removes a CouchDB Server administrator