BuddyPressCommand::get_random_user_id()
Get a random user id.
Contents
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 }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.1 | Introduced. |