BuddyPressCommand::get_random_user_id()

Get a random user id.


Return Return

(int)


Source Source

File: cli/src/command.php

	protected function get_random_user_id() {
		global $wpdb;
		return $wpdb->get_var( "SELECT ID FROM $wpdb->users ORDER BY RAND() LIMIT 1" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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