Class humhub\modules\user\components\ActiveQueryUser

Inheritancehumhub\modules\user\components\ActiveQueryUser » yii\db\ActiveQuery

ActiveQueryUser is used to query User records.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
active() Limit to active users humhub\modules\user\components\ActiveQueryUser
administrableBy() Returns only users which are administrable by the given user. humhub\modules\user\components\ActiveQueryUser
defaultOrder() Adds default user order (e.g. by lastname) humhub\modules\user\components\ActiveQueryUser
isGroupMember() Limits the query to a specified user group humhub\modules\user\components\ActiveQueryUser
search() Performs a user full text search humhub\modules\user\components\ActiveQueryUser
visible() Returns only users that should appear in user lists or in the search results. humhub\modules\user\components\ActiveQueryUser

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_CHECK_ACTIVE \humhub\modules\user\components\Event An event that is triggered when only active users are requested via active(). humhub\modules\user\components\ActiveQueryUser
EVENT_CHECK_VISIBILITY \humhub\modules\user\components\Event An event that is triggered when only visible users are requested via visible(). humhub\modules\user\components\ActiveQueryUser

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
MAX_SEARCH_NEEDLES 5 humhub\modules\user\components\ActiveQueryUser

Method Details

active() public method

Limit to active users

public humhub\modules\user\components\ActiveQueryUser active ( )
return humhub\modules\user\components\ActiveQueryUser

The query

administrableBy() public method

Returns only users which are administrable by the given user.

public humhub\modules\user\components\ActiveQueryUser administrableBy ( humhub\modules\user\models\User $user )
$user humhub\modules\user\models\User
return humhub\modules\user\components\ActiveQueryUser

The query

throws Throwable
throws \yii\base\InvalidConfigException
defaultOrder() public method

Adds default user order (e.g. by lastname)

public humhub\modules\user\components\ActiveQueryUser defaultOrder ( )
return humhub\modules\user\components\ActiveQueryUser

The query

isGroupMember() public method

Limits the query to a specified user group

public humhub\modules\user\components\ActiveQueryUser isGroupMember ( humhub\modules\user\models\Group $group )
$group humhub\modules\user\models\Group
return humhub\modules\user\components\ActiveQueryUser

The query

search() public method

Performs a user full text search

public humhub\modules\user\components\ActiveQueryUser search ( $keywords, $fields null )
$keywords string|array
$fields array|null

If empty all searchable profile fields will be used

return humhub\modules\user\components\ActiveQueryUser

The query

visible() public method (available since version 1.2.3)

Returns only users that should appear in user lists or in the search results.

Also only active (enabled) users are returned.

public humhub\modules\user\components\ActiveQueryUser visible ( )
return humhub\modules\user\components\ActiveQueryUser

The query

Event Details

EVENT_CHECK_ACTIVE event of type \humhub\modules\user\components\Event

An event that is triggered when only active users are requested via active().

EVENT_CHECK_VISIBILITY event of type \humhub\modules\user\components\Event

An event that is triggered when only visible users are requested via visible().