protected function findUser($idOrEmail)
    {
        if (!$user = User::find()->andWhere(is_numeric($idOrEmail) ? ['id' => $idOrEmail] : ['email' => $idOrEmail])->limit(1)->one()) {
            $this->stderr('User not found.' . PHP_EOL);
        }
        return $user;
    }