llms_validate_user( array $data = array(), string $location = 'checkout', array $args = array() )

Performs validations for submitted user data.


Description Description

The related functions llms_update_user() and llms_register_user() automatically perform validations so this method should only be used if you wish to test updates / registration without actually performing the registration or update action.


Top ↑

Parameters Parameters

$data

(array) (Optional) Array of user data.

Default value: array()

$location

(string) (Optional) (Optional) screen to perform validations for, accepts "account" or "checkout". Default value: 'checkout'

Default value: 'checkout'

$args

(array) (Optional) Additional arguments passed to the short-circuit filter.

Default value: array()


Top ↑

Return Return

(boolean|WP_Error) Returns true if the user data passes validation, otherwise returns an error object describing the validation issues.


Top ↑

Source Source

File: includes/functions/llms.functions.person.php

function llms_validate_user( $data = array(), $location = 'checkout', $args = array() ) {
	$args['validate_only'] = true;
	return LLMS_Form_Handler::instance()->submit( $data, $location, $args );
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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