public function unblock( $reason = null, $id = null ) {
		global $pgNotag, $pgTag;
		if( !in_array( 'block', $this->wiki->get_userrights() ) ) {
			pecho( "User is not allowed to unblock users", PECHO_FATAL );
			return false;
		}

		$token = $this->wiki->get_tokens();

		if( !array_key_exists( 'block', $token ) ) return false;

		$apiArr = array(
			'action' => 'unblock',
			'user'   => $this->username,
			'token'  => $token['unblock'],
		);

		if( !is_null( $id ) ) {
			$apiArr['id'] = $id;
			unset( $apiArr['user'] );
		}
		if( !is_null( $reason ) ) {
			if( !$pgNotag ) $reason .= $pgTag;
			$apiArr['reason'] = $reason;
		}

		Hooks::runHook( 'StartUnblock', array( &$apiArr ) );

		pecho( "Unblocking {$this->username}...\n\n", PECHO_NOTICE );

		try{
			$this->preEditChecks( "Unblock" );
		} catch( EditError $e ){
			pecho( "Error: $e\n\n", PECHO_FATAL );
			return false;
		}

		$result = $this->wiki->apiQuery( $apiArr, true );

		if( isset( $result['unblock'] ) ) {
			if( isset( $result['unblock']['user'] ) ) {
				$this->__construct( $this->wiki, $this->username );
				return true;
			} else {
				pecho( "Unblock error...\n\n" . print_r( $result['unblock'], true ) . "\n\n", PECHO_FATAL );
				return false;
			}
		} else {
			pecho( "Unblock error...\n\n" . print_r( $result, true ), PECHO_FATAL );
			return false;
		}
	}