Class craft\elements\db\UserQuery
- Inheritance
- craft\elements\db\UserQuery » craft\elements\db\ElementQuery » craft\db\Query » yii\db\Query » yii\base\Component » yii\base\BaseObject
- Implements
- craft\elements\db\ElementQueryInterface, yii\base\Configurable, yii\db\ExpressionInterface, yii\db\QueryInterface
- Uses Traits
- yii\base\ArrayableTrait, yii\db\QueryTrait
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/elements/db/UserQuery.php
UserQuery represents a SELECT SQL statement for users in a way that is independent of DBMS.
Property | Type | Description | Defined By |
---|---|---|---|
$admin |
boolean | Whether to only return users that are admins. | craft\elements\db\UserQuery |
$ancestorDist |
integer, null | The maximum number of levels that results may be separated from ancestorOf(). | craft\elements\db\ElementQuery |
$ancestorOf |
integer, craft\base\ElementInterface, null | The element (or its ID) that results must be an ancestor of. | craft\elements\db\ElementQuery |
$archived |
boolean | Whether to return only archived elements. | craft\elements\db\ElementQuery |
$asArray |
boolean | Whether to return each element as an array. | craft\elements\db\ElementQuery |
$can |
string, integer, false, null | The permission that the resulting users must have. | craft\elements\db\UserQuery |
$client |
boolean | Whether to only return the client user. | craft\elements\db\UserQuery |
$contentTable |
string, null | The content table that will be joined by this query. | craft\elements\db\ElementQuery |
$customFields |
craft\base\FieldInterface[], null | The fields that may be involved in this query. | craft\elements\db\ElementQuery |
$dateCreated |
mixed | When the resulting elements must have been created. | craft\elements\db\ElementQuery |
$dateUpdated |
mixed | When the resulting elements must have been last updated. | craft\elements\db\ElementQuery |
$descendantDist |
integer, null | The maximum number of levels that results may be separated from descendantOf(). | craft\elements\db\ElementQuery |
$descendantOf |
integer, craft\base\ElementInterface, null | The element (or its ID) that results must be a descendant of. | craft\elements\db\ElementQuery |
$distinct |
boolean | Whether to select distinct rows of data only. | yii\db\Query |
$elementType |
string, null | The name of the craft\base\ElementInterface class. | craft\elements\db\ElementQuery |
$email |
string, string[], null | The email address that the resulting users must have. | craft\elements\db\UserQuery |
$emulateExecution |
boolean | Whether to emulate the actual query execution, returning empty or false results. | yii\db\QueryTrait |
$enabledForSite |
boolean | Whether the elements must be enabled for the chosen site. | craft\elements\db\ElementQuery |
$firstName |
string, string[], null | The first name that the resulting users must have. | craft\elements\db\UserQuery |
$fixedOrder |
boolean | Whether results should be returned in the order specified by id(). | craft\elements\db\ElementQuery |
$from |
array | The table(s) to be selected from. | yii\db\Query |
$groupBy |
array | How to group the query results. | yii\db\Query |
$groupId |
integer, integer[], null | The tag group ID(s) that the resulting users must be in. | craft\elements\db\UserQuery |
$having |
string, array, yii\db\ExpressionInterface | The condition to be applied in the GROUP BY clause. | yii\db\Query |
$id |
integer, integer[], false, null | The element ID(s). | craft\elements\db\ElementQuery |
$inReverse |
boolean | Whether the results should be queried in reverse. | craft\elements\db\ElementQuery |
$indexBy |
string, callable | The name of the column by which the query results should be indexed by. | yii\db\QueryTrait |
$join |
array | How to join with other tables. | yii\db\Query |
$lastLoginDate |
mixed | The date that the resulting users must have last logged in. | craft\elements\db\UserQuery |
$lastName |
string, string[], null | The last name that the resulting users must have. | craft\elements\db\UserQuery |
$level |
mixed | The element’s level within the structure | craft\elements\db\ElementQuery |
$limit |
integer, yii\db\ExpressionInterface | Maximum number of records to be returned. | yii\db\QueryTrait |
$nextSiblingOf |
integer, craft\base\ElementInterface, null | The element (or its ID) that the result must be the next sibling of. | craft\elements\db\ElementQuery |
$offset |
integer, yii\db\ExpressionInterface | Zero-based offset from where the records are to be returned. | yii\db\QueryTrait |
$orderBy |
array | How to sort the query results. | yii\db\QueryTrait |
$params |
array | List of query parameter values indexed by parameter placeholders. | yii\db\Query |
$positionedAfter |
integer, craft\base\ElementInterface, null | The element (or its ID) that the results must be positioned after. | craft\elements\db\ElementQuery |
$positionedBefore |
integer, craft\base\ElementInterface, null | The element (or its ID) that the results must be positioned before. | craft\elements\db\ElementQuery |
$prevSiblingOf |
integer, craft\base\ElementInterface, null | The element (or its ID) that the result must be the previous sibling of. | craft\elements\db\ElementQuery |
$query |
craft\db\Query, null | The query object created by prepare() | craft\elements\db\ElementQuery |
$queryCacheDependency |
yii\caching\Dependency | The dependency to be associated with the cached query result for this query | yii\db\Query |
$queryCacheDuration |
integer, true | The default number of seconds that query results can remain valid in cache. | yii\db\Query |
$ref |
string, string[], null | The reference code(s) used to identify the element(s). | craft\elements\db\ElementQuery |
$relatedTo |
integer, array, craft\base\ElementInterface, null | The element relation criteria. | craft\elements\db\ElementQuery |
$search |
string, array, craft\search\SearchQuery, null | The search term to filter the resulting elements by. | craft\elements\db\ElementQuery |
$select |
array | The columns being selected. | yii\db\Query |
$selectOption |
string | Additional option that should be appended to the 'SELECT' keyword. | yii\db\Query |
$siblingOf |
integer, craft\base\ElementInterface, null | The element (or its ID) that the results must be a sibling of. | craft\elements\db\ElementQuery |
$siteId |
integer, null | The site ID that the elements should be returned in. | craft\elements\db\ElementQuery |
$slug |
string, string[], null | The slug that resulting elements must have. | craft\elements\db\ElementQuery |
$status |
string, string[], null | The status(es) that the resulting elements must have. | craft\elements\db\ElementQuery |
$structureId |
integer, false, null | The structure ID that should be used to join in the structureelements table. | craft\elements\db\ElementQuery |
$subQuery |
craft\db\Query, null | The subselect’s query object created by prepare() | craft\elements\db\ElementQuery |
$title |
string, string[], null | The title that resulting elements must have. | craft\elements\db\ElementQuery |
$uid |
string, string[], null | The element UID(s). | craft\elements\db\ElementQuery |
$union |
array | This is used to construct the UNION clause(s) in a SQL statement. | yii\db\Query |
$uri |
string, string[], null | The URI that the resulting element must have. | craft\elements\db\ElementQuery |
$username |
string, string[], null | The username that the resulting users must have. | craft\elements\db\UserQuery |
$where |
string, array | Query condition. | yii\db\QueryTrait |
$with |
string, array, null | The eager-loading declaration | craft\elements\db\ElementQuery |
$withStructure |
boolean, null | Whether element structure data should automatically be left-joined into the query. | craft\elements\db\ElementQuery |
Property | Type | Description | Defined By |
---|---|---|---|
$defaultOrderBy |
array | The default orderBy() value to use if orderBy() is empty but not null. | craft\elements\db\ElementQuery |
Method | Description | Defined By |
---|---|---|
__call() |
Calls the named method which is not a class method. | craft\elements\db\ElementQuery |
__clone() |
This method is called after the object is created by cloning an existing one. | yii\base\Component |
__construct() |
Constructor | craft\elements\db\UserQuery |
__get() |
Returns the value of a component property. | craft\elements\db\ElementQuery |
__isset() |
Checks if a property is set, i.e. defined and not null. | craft\elements\db\ElementQuery |
__set() |
Sets the value of a component property. | craft\elements\db\UserQuery |
__toString() |
Returns the SQL representation of Query | yii\db\Query |
__unset() |
Sets an object property to null. | yii\base\BaseObject |
addGroupBy() |
Adds additional group-by columns to the existing ones. | yii\db\Query |
addOrderBy() |
Adds additional ORDER BY columns to the query. | yii\db\QueryTrait |
addParams() |
Adds additional parameters to be bound to the query. | yii\db\Query |
addSelect() |
Add more columns to the SELECT part of the query. | yii\db\Query |
admin() |
Sets the admin() property. | craft\elements\db\UserQuery |
all() |
Executes the query and returns all results as an array. | craft\elements\db\ElementQuery |
ancestorDist() |
Sets the ancestorDist() property. | craft\elements\db\ElementQuery |
ancestorOf() |
Sets the ancestorOf() property. | craft\elements\db\ElementQuery |
andFilterCompare() |
Adds a filtering condition for a specific column and allow the user to choose a filter operator. | yii\db\Query |
andFilterHaving() |
Adds an additional HAVING condition to the existing one but ignores empty operands. | yii\db\Query |
andFilterWhere() |
Adds an additional WHERE condition to the existing one but ignores empty operands. | yii\db\QueryTrait |
andHaving() |
Adds an additional HAVING condition to the existing one. | yii\db\Query |
andWhere() |
Adds an additional WHERE condition to the existing one. | yii\db\QueryTrait |
archived() |
Sets the archived() property. | craft\elements\db\ElementQuery |
asArray() |
Sets the asArray() property. | craft\elements\db\ElementQuery |
attachBehavior() |
Attaches a behavior to this component. | yii\base\Component |
attachBehaviors() |
Attaches a list of behaviors to the component. | yii\base\Component |
average() |
Returns the average of the specified column values. | yii\db\Query |
batch() |
Starts a batch query. | yii\db\Query |
behaviors() |
Returns a list of behaviors that this component should behave as. | craft\elements\db\ElementQuery |
cache() |
Enables query cache for this Query. | yii\db\Query |
can() |
Sets the can() property. | craft\elements\db\UserQuery |
canGetProperty() |
Returns a value indicating whether a property can be read. | yii\base\BaseObject |
canSetProperty() |
Returns a value indicating whether a property can be set. | yii\base\BaseObject |
className() |
Returns the fully qualified name of this class. | yii\base\BaseObject |
client() |
Sets the client() property. | craft\elements\db\UserQuery |
column() |
Executes the query and returns the first column of the result. | craft\db\Query |
count() |
Returns the number of records. | craft\elements\db\ElementQuery |
create() |
Creates a new Query object and copies its property values from an existing one. | yii\db\Query |
createCommand() |
Creates a DB command that can be used to execute this query. | yii\db\Query |
criteriaAttributes() |
Returns the query's criteria attributes. | craft\elements\db\ElementQuery |
dateCreated() |
Sets the dateCreated() property. | craft\elements\db\ElementQuery |
dateUpdated() |
Sets the dateUpdated() property. | craft\elements\db\ElementQuery |
descendantDist() |
Sets the descendantDist() property. | craft\elements\db\ElementQuery |
descendantOf() |
Sets the descendantOf() property. | craft\elements\db\ElementQuery |
detachBehavior() |
Detaches a behavior from the component. | yii\base\Component |
detachBehaviors() |
Detaches all behaviors from the component. | yii\base\Component |
distinct() |
Sets the value indicating whether to SELECT DISTINCT or not. | yii\db\Query |
each() |
Starts a batch query and retrieves data row by row. | yii\db\Query |
email() |
Sets the email() property. | craft\elements\db\UserQuery |
emulateExecution() |
Sets whether to emulate query execution, preventing any interaction with data storage. | yii\db\QueryTrait |
enabledForSite() |
Sets the enabledForSite() property. | craft\elements\db\ElementQuery |
ensureBehaviors() |
Makes sure that the behaviors declared in behaviors() are attached to this component. | yii\base\Component |
exists() |
Returns a value indicating whether the query result contains any row of data. | craft\db\Query |
extraFields() |
Returns the list of fields that can be expanded further and returned by toArray(). | yii\base\ArrayableTrait |
fields() |
Returns the list of fields that should be returned by default by toArray() when no specific fields are specified. | yii\base\ArrayableTrait |
filterHaving() |
Sets the HAVING part of the query but ignores empty operands. | yii\db\Query |
filterWhere() |
Sets the WHERE part of the query but ignores empty operands. | yii\db\QueryTrait |
find() |
Returns all elements that match the criteria. | craft\elements\db\ElementQuery |
first() |
Returns the first element that matches the criteria. | craft\elements\db\ElementQuery |
firstName() |
Sets the firstName() property. | craft\elements\db\UserQuery |
fixedOrder() |
Sets the fixedOrder() property. | craft\elements\db\ElementQuery |
from() |
Sets the FROM part of the query. | yii\db\Query |
getBehavior() |
Returns the named behavior object. | yii\base\Component |
getBehaviors() |
Returns all behaviors attached to this component. | yii\base\Component |
getCachedResult() |
Returns the resulting elements set by setCachedResult(), if the criteria params haven’t changed since then. | craft\elements\db\ElementQuery |
getCriteria() |
Returns an array of the current criteria attribute values. | craft\elements\db\ElementQuery |
getIterator() |
Required by the IteratorAggregate interface. | craft\elements\db\ElementQuery |
getRawSql() |
Shortcut for createCommand()->getRawSql() . |
craft\db\Query |
getTablesUsedInFrom() |
Returns table names used in from() indexed by aliases. | yii\db\Query |
group() |
Sets the groupId() property based on a given tag group(s)’s handle(s). | craft\elements\db\UserQuery |
groupBy() |
Sets the GROUP BY part of the query. | yii\db\Query |
groupId() |
Sets the groupId() property. | craft\elements\db\UserQuery |
hasEventHandlers() |
Returns a value indicating whether there is any handler attached to the named event. | yii\base\Component |
hasMethod() |
Returns a value indicating whether a method is defined. | yii\base\BaseObject |
hasProperty() |
Returns a value indicating whether a property is defined. | yii\base\BaseObject |
having() |
Sets the HAVING part of the query. | yii\db\Query |
id() |
Sets the id() property. | craft\elements\db\ElementQuery |
ids() |
Executes the query and returns the IDs of the resulting elements. | craft\elements\db\ElementQuery |
inReverse() |
Sets the inReverse() property. | craft\elements\db\ElementQuery |
indexBy() |
Sets the indexBy() property. | yii\db\QueryTrait |
init() |
Initializes the object. | craft\db\Query |
innerJoin() |
Appends an INNER JOIN part to the query. | yii\db\Query |
isJoined() |
Returns whether a given table has been joined in this query. | craft\db\Query |
join() |
Appends a JOIN part to the query. | yii\db\Query |
last() |
Returns the last element that matches the criteria. | craft\elements\db\ElementQuery |
lastLoginDate() |
Sets the lastLoginDate() property. | craft\elements\db\UserQuery |
lastName() |
Sets the lastName() property. | craft\elements\db\UserQuery |
leftJoin() |
Appends a LEFT OUTER JOIN part to the query. | yii\db\Query |
level() |
Sets the level() property. | craft\elements\db\ElementQuery |
limit() |
Sets the LIMIT part of the query. | yii\db\QueryTrait |
locale() |
Sets the site() property. | craft\elements\db\ElementQuery |
localeEnabled() |
Sets the enabledForSite() property. | craft\elements\db\ElementQuery |
max() |
Returns the maximum of the specified column values. | yii\db\Query |
min() |
Returns the minimum of the specified column values. | yii\db\Query |
nextSiblingOf() |
Sets the nextSiblingOf() property. | craft\elements\db\ElementQuery |
noCache() |
Disables query cache for this Query. | yii\db\Query |
nth() |
Executes the query and returns a single row of result at a given offset. | craft\elements\db\ElementQuery |
off() |
Detaches an existing event handler from this component. | yii\base\Component |
offset() |
Sets the OFFSET part of the query. | yii\db\QueryTrait |
offsetExists() |
Required by the ArrayAccess interface. | craft\elements\db\ElementQuery |
offsetGet() |
Required by the ArrayAccess interface. | craft\elements\db\ElementQuery |
offsetSet() |
Required by the ArrayAccess interface. | craft\elements\db\ElementQuery |
offsetUnset() |
Required by the ArrayAccess interface. | craft\elements\db\ElementQuery |
on() |
Attaches an event handler to an event. | yii\base\Component |
one() |
Executes the query and returns a single row of result. | craft\elements\db\ElementQuery |
orFilterHaving() |
Adds an additional HAVING condition to the existing one but ignores empty operands. | yii\db\Query |
orFilterWhere() |
Adds an additional WHERE condition to the existing one but ignores empty operands. | yii\db\QueryTrait |
orHaving() |
Adds an additional HAVING condition to the existing one. | yii\db\Query |
orWhere() |
Adds an additional WHERE condition to the existing one. | yii\db\QueryTrait |
order() |
Sets the orderBy() property. | craft\elements\db\ElementQuery |
orderBy() |
Sets the ORDER BY part of the query. | yii\db\QueryTrait |
pairs() |
Executes the query and returns the first two columns in the results as key/value pairs. | craft\db\Query |
params() |
Sets the parameters to be bound to the query. | yii\db\Query |
populate() |
Converts the raw query results into the format as specified by this query. | craft\elements\db\ElementQuery |
positionedAfter() |
Sets the positionedAfter() property. | craft\elements\db\ElementQuery |
positionedBefore() |
Sets the positionedBefore() property. | craft\elements\db\ElementQuery |
prepare() |
Prepares for building SQL. | craft\elements\db\ElementQuery |
prevSiblingOf() |
Sets the prevSiblingOf() property. | craft\elements\db\ElementQuery |
ref() |
Sets the ref() property. | craft\elements\db\ElementQuery |
relatedTo() |
Sets the relatedTo() property. | craft\elements\db\ElementQuery |
rightJoin() |
Appends a RIGHT OUTER JOIN part to the query. | yii\db\Query |
scalar() |
Returns the query result as a scalar value. | craft\db\Query |
search() |
Sets the search() property. | craft\elements\db\ElementQuery |
select() |
Sets the SELECT part of the query. | yii\db\Query |
setCachedResult() |
Sets the resulting elements. | craft\elements\db\ElementQuery |
siblingOf() |
Sets the siblingOf() property. | craft\elements\db\ElementQuery |
site() |
Sets the siteId() property based on a given site(s)’s handle. | craft\elements\db\ElementQuery |
siteId() |
Sets the siteId() property. | craft\elements\db\ElementQuery |
slug() |
Sets the slug() property. | craft\elements\db\ElementQuery |
status() |
Sets the status() property. | craft\elements\db\ElementQuery |
structureId() |
Sets the structureId() property. | craft\elements\db\ElementQuery |
sum() |
Returns the sum of the specified column values. | yii\db\Query |
title() |
Sets the title() property. | craft\elements\db\ElementQuery |
toArray() |
Converts the model into an array. | yii\base\ArrayableTrait |
total() |
Returns the total elements that match the criteria. | craft\elements\db\ElementQuery |
trigger() |
Triggers an event. | yii\base\Component |
uid() |
Sets the uid() property. | craft\elements\db\ElementQuery |
union() |
Appends a SQL statement using UNION operator. | yii\db\Query |
uri() |
Sets the uri() property. | craft\elements\db\ElementQuery |
username() |
Sets the username() property. | craft\elements\db\UserQuery |
where() |
Sets the WHERE part of the query. | yii\db\QueryTrait |
with() |
Sets the with() property. | craft\elements\db\ElementQuery |
withStructure() |
Sets the withStructure() property. | craft\elements\db\ElementQuery |
Method | Description | Defined By |
---|---|---|
afterPrepare() |
This method is called at the end of preparing an element query for the query builder. | craft\elements\db\ElementQuery |
beforePrepare() |
This method is called at the beginning of preparing an element query for the query builder. | craft\elements\db\UserQuery |
cleanUpTableNames() |
Clean up table names and aliases Both aliases and names are enclosed into {{ and }}. | yii\db\Query |
customFields() |
Returns the fields that should take part in an upcoming elements query. | craft\elements\db\ElementQuery |
extractFieldsFor() |
Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id". | yii\base\ArrayableTrait |
extractRootFields() |
Extracts the root field names from nested fields. | yii\base\ArrayableTrait |
filterCondition() |
Removes empty operands from the given query condition. | yii\db\QueryTrait |
getUnaliasedColumnsFromSelect() |
yii\db\Query | |
getUniqueColumns() |
Returns unique column names excluding duplicates. | yii\db\Query |
isEmpty() |
Returns a value indicating whether the give value is "empty". | yii\db\QueryTrait |
joinElementTable() |
Joins in a table with an id column that has a foreign key pointing to craft_elements .id . |
craft\elements\db\ElementQuery |
normalizeOrderBy() |
Normalizes format of ORDER BY data. | yii\db\QueryTrait |
queryScalar() |
Queries a scalar value by setting select() first. | craft\db\Query |
resolveFields() |
Determines which fields can be returned by toArray(). | yii\base\ArrayableTrait |
setCommandCache() |
Sets $command cache, if this query has enabled caching. | yii\db\Query |
statusCondition() |
Returns the condition that should be applied to the element query for a given status. | craft\elements\db\UserQuery |
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_AFTER_POPULATE_ELEMENT |
craft\events\PopulateElementEvent | The event that is triggered after an element is populated. | craft\elements\db\ElementQuery |
EVENT_AFTER_PREPARE |
\craft\elements\db\Event | An event that is triggered at the end of preparing an element query for the query builder. | craft\elements\db\ElementQuery |
EVENT_BEFORE_PREPARE |
\craft\elements\db\Event | An event that is triggered at the beginning of preparing an element query for the query builder. | craft\elements\db\ElementQuery |
EVENT_DEFINE_BEHAVIORS |
craft\events\DefineBehaviorsEvent | The event that is triggered when defining the class behaviors | craft\db\Query |
EVENT_INIT |
yii\base\Event | The event that is triggered after the query's init cycle | craft\db\Query |
Property Details
$admin
public property
#
Whether to only return users that are admins.
public boolean $admin = false
$can
public property
#
The permission that the resulting users must have.
public string, integer, false, null $can = null
$client
public property
#
Whether to only return the client user.
public boolean $client = false
$email
public property
#
The email address that the resulting users must have.
public string, string[], null $email = null
$firstName
public property
#
The first name that the resulting users must have.
public string, string[], null $firstName = null
$groupId
public property
#
The tag group ID(s) that the resulting users must be in.
public integer, integer[], null $groupId = null
$lastLoginDate
public property
#
The date that the resulting users must have last logged in.
public mixed $lastLoginDate = null
$lastName
public property
#
The last name that the resulting users must have.
public string, string[], null $lastName = null
$username
public property
#
The username that the resulting users must have.
public string, string[], null $username = null
Method Details
__construct()
public method
#
Constructor
public void __construct ( $elementType, array $config = [] )
$elementType |
string | The element type class associated with this query |
$config |
array | Configurations to be applied to the newly created query object |
__set()
public method
#
Sets the value of a component property.
This method will check in the following order and act accordingly:
- a property defined by a setter: set the property value
- an event in the format of "on xyz": attach the handler to the event "xyz"
- a behavior in the format of "as xyz": attach the behavior named as "xyz"
- a property of a behavior: set the behavior property value
Do not call this method directly as it is a PHP magic method that
will be implicitly called when executing $component->property = $value;
.
public void __set ( $name, $value )
$name |
string | The property name or the event name |
$value |
mixed | The property value |
throws | yii\base\UnknownPropertyException | if the property is not defined |
---|---|---|
throws | yii\base\InvalidCallException | if the property is read-only. |
admin()
public method
#
Sets the admin() property.
public static admin ( \craft\elements\db\bool $value = true )
$value |
boolean | The property value (defaults to true) |
return | static | Self reference |
---|
beforePrepare()
protected method
#
This method is called at the beginning of preparing an element query for the query builder.
The main Query object being prepared for the query builder is available via $query. The subselect’s Query object being prepared is available via $subQuery. The role of the subselect query is to apply conditions to the query and narrow the result set down to just the elements that should actually be returned. The role of the main query is to join in any tables that should be included in the results, and select all of the columns that should be included in the results.
protected boolean beforePrepare ( )
return | boolean | Whether the query should be prepared and returned to the query builder. If false, the query will be cancelled and no results will be returned. |
---|
can()
public method
#
Sets the can() property.
public static can ( $value )
$value |
string, integer, null | The property value |
return | static | Self reference |
---|
client()
public method
#
Sets the client() property.
public static client ( \craft\elements\db\bool $value = true )
$value |
boolean | The property value (defaults to true) |
return | static | Self reference |
---|
email()
public method
#
Sets the email() property.
public static email ( $value )
$value |
string, string[], null | The property value |
return | static | Self reference |
---|
firstName()
public method
#
Sets the firstName() property.
public static firstName ( $value )
$value |
string, string[], null | The property value |
return | static | Self reference |
---|
group()
public method
#
Sets the groupId() property based on a given tag group(s)’s handle(s).
public static group ( $value )
$value |
string, string[], craft\models\UserGroup, null | The property value |
return | static | Self reference |
---|
groupId()
public method
#
Sets the groupId() property.
public static groupId ( $value )
$value |
integer, integer[], null | The property value |
return | static | Self reference |
---|
lastLoginDate()
public method
#
Sets the lastLoginDate() property.
public static lastLoginDate ( $value )
$value |
mixed | The property value |
return | static | Self reference |
---|
lastName()
public method
#
Sets the lastName() property.
public static lastName ( $value )
$value |
string, string[], null | The property value |
return | static | Self reference |
---|
statusCondition()
protected method
#
Returns the condition that should be applied to the element query for a given status.
For example, if you support a status called “pending”, which maps back to a pending
database column that will
either be 0 or 1, this method could do this:
protected function statusCondition($status)
{
switch ($status) {
case 'pending':
return ['mytable.pending' => 1];
default:
return parent::statusCondition($status);
}
protected string, array, yii\db\ExpressionInterface, false, null statusCondition ( \craft\elements\db\string $status )
$status |
string | The status |
return | string, array, yii\db\ExpressionInterface, false, null | The status condition, or false if $status is an unsupported status |
---|
username()
public method
#
Sets the username() property.
public static username ( $value )
$value |
string, string[], null | The property value |
return | static | Self reference |
---|