diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index 1f653327..c4b0d7b1 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -365,6 +365,7 @@ class PostController public function hideAction($id) { $post = Model_Post::locate($id); + R::preload($post, ['uploader' => 'user']); PrivilegesHelper::confirmWithException(Privilege::HidePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader)); if (InputHelper::get('submit')) { @@ -380,6 +381,7 @@ class PostController public function unhideAction($id) { $post = Model_Post::locate($id); + R::preload($post, ['uploader' => 'user']); PrivilegesHelper::confirmWithException(Privilege::HidePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader)); if (InputHelper::get('submit')) { @@ -395,6 +397,7 @@ class PostController public function deleteAction($id) { $post = Model_Post::locate($id); + R::preload($post, ['uploader' => 'user']); PrivilegesHelper::confirmWithException(Privilege::DeletePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader)); if (InputHelper::get('submit')) {