Extension of WP_User_Query to allow easy looping.

since 2.6.0 bbPress (r6330)
package bbPress

 Methods

PHP5 constructor.

__construct(null|string|array $query = null
since 2.6.0 bbPress (r6330)
access public

Parameters

$query

nullstringarray

Optional. The query variables.

Determines whether there are more users available in the loop.

have_users() : boolean

Calls the \'loop_end' action when the loop is complete.

since 2.6.0 bbPress (r6330)
access public

Returns

booleanTrue if users are available, false if end of loop.

Set up the next user and iterate current user index.

next_user() : \WP_User
since 2.6.0 bbPress (r6330)
access public

Returns

\WP_UserNext user.

Rewind the users and reset user index.

rewind_users() 
since 2.6.0 bbPress (r6330)
access public

Sets up the current user.

the_user() 

Retrieves the next user, sets up the user, sets the 'in the loop' property to true.

since 2.6.0 bbPress (r6330)
access public
global WP_User $user

 Properties

 

Index of the current item in the loop.

$current_user : integer

Default

-1
since 2.6.0 bbPress (r6330)
access public
 

Whether the loop has started and the caller is in the loop.

$in_the_loop : boolean

Default

false
since 2.6.0 bbPress (r6330)
access public
 

The current user.

$user : \WP_User

Default

since 2.6.0 bbPress (r6330)
access public
 

The amount of users for the current query.

$user_count : integer

Default

0
since 2.6.0 bbPress (r6330)
access public