public static function findByUsernameOrEmail($username, $checkStatus = true)
    {
        $query = static::find();
        $query->where(['or', ['username' => $username], ['email' => $username]]);
        if ($checkStatus) {
            $query->andWhere(['status' => self::STATUS_ACTIVE]);
        }
        return $query->limit(1)->one();
    }