Skip to content

Commit

Permalink
dont fail for VIP subscriptions (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
proditis authored Jan 19, 2023
1 parent 860f255 commit fbeba7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/themes/material/layouts/left.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<?php if(!Yii::$app->user->isGuest):?>
<a href="<?=Url::to(['/profile/me'])?>" class="simple-text logo-normal" style="text-transform:none" title="<?=\Yii::t('app','Profile of')?> <?=Html::encode(Yii::$app->user->identity->username)?><?= Yii::$app->user->identity->onVPN ? "\nVPN IP: ".Yii::$app->user->identity->vpnIP : "" ?>">
<?php if(Yii::$app->user->identity->isVip):?>
<span class="badge badge-danger" style="position: absolute; bottom: 32%; left: 57%"><?php if(Yii::$app->user->identity->subscription!==null):?><img src="/images/<?=Yii::$app->user->identity->subscription->product->shortcode?>.svg" width="20px"><?php else:?>VIP<?php endif;?></span>
<span class="badge badge-danger" style="position: absolute; bottom: 32%; left: 57%"><?php if(Yii::$app->user->identity->subscription!==null):?><img src="/images/<?=Yii::$app->user->identity->subscription->product ? Yii::$app->user->identity->subscription->product->shortcode : "vip"?>.svg" width="20px"><?php else:?>VIP<?php endif;?></span>
<?php endif;?>
<img style="width: 75px; height: 75px" src="/images/avatars/<?=Yii::$app->user->identity->profile->avtr;?>?<?=Yii::$app->formatter->asTimestamp(Yii::$app->user->identity->profile->updated_at)?>" class="img-fluid rounded <?php if(Yii::$app->user->identity->isVip):?>border-danger<?php endif;?> <?=\app\components\formatters\RankFormatter::ordinalPlaceCss(Yii::$app->user->identity->profile->rank->id)?>" style="max-width: 60px; max-height: 60px" alt="Avatar of <?=Html::encode(Yii::$app->user->identity->username)?>"><br/>
<i class="fas fa-shield-alt <?= Yii::$app->user->identity->onVPN ? "text-primary" : "text-danger"?>" style="font-size: 0.75em"></i> <?=Html::encode(Yii::$app->user->identity->username)?> <small style="font-size: 0.65em">(<code><?=number_format(Yii::$app->user->identity->profile->score->points)?> pts</code>)</small>
Expand Down

0 comments on commit fbeba7e

Please sign in to comment.