llms_validate_instructors( array $instructors )

Validate submitted array of integers is an array of real user ids


Parameters Parameters

$instructors

(array) (Required) Array of instructors id.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php

function llms_validate_instructors( $instructors ) {
	return ! empty( $instructors ) ? count( array_filter( array_map( 'get_userdata', $instructors ) ) ) === count( $instructors ) : false;
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.9 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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