for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace inblank\activeuser\models;
use yii\db\ActiveQuery;
/**
* This is the ActiveQuery class for [[User]].
*
* @see User
*/
class UserQuery extends ActiveQuery
{
* Filter only active user
* @return $this
public function active()
$this->andWhere('[[status]]=' . User::STATUS_ACTIVE);
return $this;
}
* Filter only blocked user
public function blocked()
$this->andWhere('[[status]]=' . User::STATUS_BLOCKED);
* Filter only user waiting confirmation
public function notConfirmed()
$this->andWhere('[[status]]=' . User::STATUS_CONFIRM);
* Filter user that requested access restore
public function restoring()
$this->andWhere('[[status]]=' . User::STATUS_RESTORE);
* @inheritdoc
* @return User[]|array
public function all($db = null)
return parent::all($db);
* @return User|array|null
public function one($db = null)
return parent::one($db);
parent::one($db);
yii\db\ActiveRecord|array|null
yii\db\ActiveRecord
yii\db\QueryInterface::one
array|boolean