Skip to content

Commit

Permalink
do not allow user logged in to edit their own user by clicking on the…
Browse files Browse the repository at this point in the history
…ir avatar under users
  • Loading branch information
johnnyq committed Oct 5, 2023
1 parent 6760997 commit 0c0d89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
?>
<tr>
<td class="text-center">
<a class="text-dark" href="#" data-toggle="modal" data-target="#editUserModal<?php echo $user_id; ?>">
<a class="text-dark" href="#" <?php if ($user_id !== $session_user_id) { // Prevent modifying self ?> data-toggle="modal" data-target="#editUserModal<?php echo $user_id; ?>" <?php } ?>>
<?php if (!empty($user_avatar)) { ?>
<img class="img-size-50 img-circle" src="<?php echo "uploads/users/$user_id/$user_avatar"; ?>">
<?php } else { ?>
Expand Down

0 comments on commit 0c0d89c

Please sign in to comment.