Commit 9e93c2b9 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[TASK] Require Login, to post an article

parent 0f2295dc
......@@ -202,14 +202,16 @@ class ArticleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
$newT3planetArticles->setArticleDate($date);
if ($user) {
$newT3planetArticles->setName($user->getUsername());
$newT3planetArticles->setName($user->getName());
$newT3planetArticles->setEmail($user->getEmail());
$newT3planetArticles->setFeUserid($user->getUid());
}
$newT3planetArticles->setPid($storagePid);
$newT3planetArticles->setFeUserid($user->getUsername());
$newT3planetArticles->setPid($storagePid);
$this->articleRepository->add($newT3planetArticles);
$this->articleRepository->add($newT3planetArticles);
}
else {
$this->addFlashMessage('You need to login first!', 'No access!', FlashMessage::ERROR);
}
if ($backPid) {
$this->addFlashMessage('A new article inserted successfully!', 'Success!', FlashMessage::OK);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment