Skip to content

Commit

Permalink
User settings: Route FIX
Browse files Browse the repository at this point in the history
Fixed the route for the avatar fetching by id
  • Loading branch information
fet1sov committed Apr 22, 2024
1 parent 4551d8c commit 22385a4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions www/backend/routes/user/user.view.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<link href="_styles/_css/user.css" rel="stylesheet"/>

<?php
$userData = null;
if (!isset($_SESSION["userData"]))
{
header('Location: /');
} else {
$userData = unserialize($_SESSION["userData"]);
}
?>

Expand Down Expand Up @@ -112,16 +109,16 @@
</style>

<script>

</script>

<section>
<form method="post">
<div class="settings-section-block avatars">
<div class="avatars-block">
<img id="smallAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?id=<?= $userData->getId() ?>">
<img id="middleAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?id=<?= $userData->getId() ?>">
<img id="bigAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?id=<?= $userData->getId() ?>">
<img id="smallAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?userid=<?= unserialize($_SESSION["userData"])->getId(); ?>">
<img id="middleAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?userid=<?= unserialize($_SESSION["userData"])->getId(); ?>">
<img id="bigAvatarPic" alt="Small avatar preview" class="avatar-preview" src="../../api/avatar?userid=<?= unserialize($_SESSION["userData"])->getId(); ?>">
</div>

<div class="avatars-block small-category-block">
Expand Down

0 comments on commit 22385a4

Please sign in to comment.