From 8d478b9c39e06eee23d1ef20371ae02ee69cb5af Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 26 Feb 2021 23:56:50 +0000 Subject: [PATCH] refer to user --- ext/upload/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index 9c06e719..4345e8fc 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -188,7 +188,7 @@ class Upload extends Extension if ($event->page_matches("upload/replace")) { if (!$user->can(Permissions::REPLACE_IMAGE)) { - $this->theme->display_error(403, "Error", "You don't have permission to replace images"); + $this->theme->display_error(403, "Error", "{$user->name} doesn't have permission to replace images"); return; } if ($this->is_full) { @@ -228,7 +228,7 @@ class Upload extends Extension } } elseif ($event->page_matches("upload")) { if (!$user->can(Permissions::CREATE_IMAGE)) { - $this->theme->display_error(403, "Error", "You don't have permission to upload images"); + $this->theme->display_error(403, "Error", "{$user->name} doesn't have permission to upload images"); return; } if ($this->is_full) {