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;
    }
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;
    }
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 ; }
Finds user by id or email
@param int|string $idOrEmail internal podium user id or email
@return User
Finds user by id or email