Map request keys to database keys for insertion

Description Description

Array keys are the request fields (as defined in the schema) and array values are the database fields.

Top ↑

Return Return


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-users-controller.php

	protected function map_schema_to_database() {

		$map = parent::map_schema_to_database();

		$map['username']         = 'user_login';
		$map['password']         = 'user_pass';
		$map['name']             = 'display_name';
		$map['email']            = 'user_email';
		$map['url']              = 'user_url';
		$map['registered_date']  = 'user_registered';
		$map['billing_postcode'] = 'billing_zip';

		// Not inserted/read via database calls.
		unset( $map['roles'], $map['avatar_urls'] );

		return $map;


Top ↑

Changelog Changelog

Version Description
1.0.0-beta.11 Correctly map request's billing_postcode param to billing_zip meta.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.