protected function createPreOneTwentySeven( $params ) {
		$newParams = [
			'name' => $params['username'],
			'password' => $params['password'],
		];
		if ( array_key_exists( 'email', $params ) ) {
			$newParams['email'] = $params['email'];
		}
		// First get the token.
		$tokenRequest = new SimpleRequest( 'createaccount', $newParams );
		$result = $this->api->postRequest( $tokenRequest );
		if ( $result['createaccount']['result'] == 'NeedToken' ) {
			// Then send the token to create the account.
			$newParams['token'] = $result['createaccount']['token'];
			$request = new SimpleRequest( 'createaccount', $newParams );
			$result = $this->api->postRequest( $request );
		}
		return ( $result['createaccount']['result'] === 'Success' );
	}
protected function createPreOneTwentySeven( $params ) {
		$newParams = [
			'name' => $params['username'],
			'password' => $params['password'],
		];
		if ( array_key_exists( 'email', $params ) ) {
			$newParams['email'] = $params['email'];
		}
		// First get the token.
		$tokenRequest = new SimpleRequest( 'createaccount', $newParams );
		$result = $this->api->postRequest( $tokenRequest );
		if ( $result['createaccount']['result'] == 'NeedToken' ) {
			// Then send the token to create the account.
			$newParams['token'] = $result['createaccount']['token'];
			$request = new SimpleRequest( 'createaccount', $newParams );
			$result = $this->api->postRequest( $request );
		}
		return ( $result['createaccount']['result'] === 'Success' );
	}
protected function createPreOneTwentySeven ( $ params ) { $ newParams = [ 'name' => $ params [ 'username' ] , 'password' => $ params [ 'password' ] , ] ; if ( array_key_exists ( 'email' , $ params ) ) { $ newParams [ 'email' ] = $ params [ 'email' ] ; } // First get the token. $ tokenRequest = new SimpleRequest ( 'createaccount' , $ newParams ) ; $ result = $ this -> api -> postRequest ( $ tokenRequest ) ; if ( $ result [ 'createaccount' ] [ 'result' ] == 'NeedToken' ) { // Then send the token to create the account. $ newParams [ 'token' ] = $ result [ 'createaccount' ] [ 'token' ] ; $ request = new SimpleRequest ( 'createaccount' , $ newParams ) ; $ result = $ this -> api -> postRequest ( $ request ) ; } return ( $ result [ 'createaccount' ] [ 'result' ] === 'Success' ) ; }
Create a user in the pre 1.27 manner.
@link https://www.mediawiki.org/wiki/API:Account_creation/pre-1.27
@return bool
Create a user in the pre 1 . 27 manner .