From 80af9abfe86dc7bb7a0d9c1ca0b98e6cb9f18446 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Feb 2023 03:44:12 +0000 Subject: [PATCH] Fix #80 --- Model/NewTaskCreationModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/NewTaskCreationModel.php b/Model/NewTaskCreationModel.php index d2fc920..0c4fa4d 100644 --- a/Model/NewTaskCreationModel.php +++ b/Model/NewTaskCreationModel.php @@ -102,8 +102,8 @@ protected function prepare(array &$values) $values['title'] = t('Untitled'); } - if ($this->userSession->isLogged()) { - $values['creator_id'] = $this->userSession->getId(); + if ($this->userSession->isLogged() && !empty($values['creator_id'])) { + $values['creator_id'] = $this->userSession->getId(); } $values['swimlane_id'] = empty($values['swimlane_id']) ? $this->swimlaneModel->getFirstActiveSwimlaneId($values['project_id']) : $values['swimlane_id'];