From a1c2dc6500fc2005ee6d0bd9254a56c4f5bec9ea Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Wed, 31 Aug 2022 09:05:23 +0000 Subject: [PATCH] fix sending of messages to selection of users by status, fixes #1496 Closes #1496 Merge request studip/studip!935 --- app/controllers/course/members.php | 1 - app/controllers/messages.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/course/members.php b/app/controllers/course/members.php index e9cdb5f3472..364542b9ca6 100644 --- a/app/controllers/course/members.php +++ b/app/controllers/course/members.php @@ -564,7 +564,6 @@ class Course_MembersController extends AuthenticatedController $this->redirect(URLHelper::getURL('dispatch.php/messages/write', [ 'default_subject' => $this->getSubject(), 'tmpsavesnd' => 1, - 'course_id' => $this->course_id, 'emailrequest' => 1 ])); } else { diff --git a/app/controllers/messages.php b/app/controllers/messages.php index c6672ae6dbf..d3d8985a91c 100644 --- a/app/controllers/messages.php +++ b/app/controllers/messages.php @@ -370,7 +370,7 @@ class MessagesController extends AuthenticatedController { $query = "SELECT user_id, 'rec' AS snd_rec FROM seminar_user JOIN auth_user_md5 USING (user_id) - WHERE Seminar_id = ? AND seminar_user.visible != 'no' + WHERE Seminar_id = :course_id AND seminar_user.visible != 'no' ORDER BY Nachname, Vorname"; } if ($query) { -- GitLab