Commit 1d8355be authored by Stefan Busemann's avatar Stefan Busemann

Merge branch 'develop' into 'master'

Release 2019-05-26

See merge request !163
parents 2a7be7da 93786b44
Pipeline #7097 passed with stages
in 3 minutes and 53 seconds
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ff185ffb5293f017715ba156a6a3cdca",
"content-hash": "9d27d183b18af23aa7a2d4295c314ab6",
"packages": [
{
"name": "adoy/fastcgi-client",
......@@ -1211,16 +1211,16 @@
},
{
"name": "in2code/femanager",
"version": "5.1.0",
"version": "5.1.1",
"source": {
"type": "git",
"url": "https://github.com/in2code-de/femanager.git",
"reference": "79f711d672936be78a52d6fb17aab1d72b48e430"
"reference": "b084802c6bf603855651a0c622fe8ce4f557634a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/in2code-de/femanager/zipball/79f711d672936be78a52d6fb17aab1d72b48e430",
"reference": "79f711d672936be78a52d6fb17aab1d72b48e430",
"url": "https://api.github.com/repos/in2code-de/femanager/zipball/b084802c6bf603855651a0c622fe8ce4f557634a",
"reference": "b084802c6bf603855651a0c622fe8ce4f557634a",
"shasum": ""
},
"require": {
......@@ -1278,11 +1278,11 @@
"sr_feuser_register",
"typo3"
],
"time": "2019-05-21T17:06:36+00:00"
"time": "2019-05-26T12:00:20+00:00"
},
{
"name": "in2code/userprofile",
"version": "0.3.0",
"version": "dev-singleview",
"source": {
"type": "git",
"url": "https://github.com/in2code-de/userprofile.git",
......@@ -1303,16 +1303,19 @@
"In2code\\Userprofile\\": "Classes"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"description": "TYPO3-Extension to manage user profiles",
"homepage": "https://www.in2code.de",
"keywords": [
"extension",
"typo3"
"TYPO3",
"extension"
],
"support": {
"source": "https://github.com/in2code-de/userprofile/tree/0.3.0",
"issues": "https://github.com/in2code-de/userprofile/issues"
},
"time": "2019-05-21T12:16:07+00:00"
},
{
......@@ -4890,7 +4893,8 @@
"t3o/t3olayout": 20,
"t3o/t3omy": 20,
"t3o/t3o_slack": 20,
"t3o/t3o_ldap": 20
"t3o/t3o_ldap": 20,
"in2code/userprofile": 20
},
"prefer-stable": false,
"prefer-lowest": false,
......
......@@ -22,12 +22,11 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
/**
* Check if a property of the userprofile is visible in the current context
*
* @param int $frontendUserUID
* @return string
*/
public function render(int $frontendUserUID)
public function render()
{
$feUser = $this->slackFrontendUserRepository->findByUid($frontendUserUID);
$feUser = $this->slackFrontendUserRepository->findByUid((int)$this->arguments['frontendUserUID']);
$slackUser = $this->slackUserRepository->findBySlackId($feUser->getSlackId());
if ($slackUser) {
......@@ -38,7 +37,7 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
}
} else {
// @todo render link to register for slack
if ($GLOBALS['TSFE']->fe_user->user['uid'] == $frontendUserUID) {
if ($GLOBALS['TSFE']->fe_user->user['uid'] === (int)$this->arguments['frontendUserUID']) {
// @todo add TS configuration
$content = '<a href="https://my.typo3.org/?id=23">Get your TYPO3 Slack Account</a>';
} else {
......@@ -48,4 +47,13 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
return $content;
}
/**
* Initialize
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('frontendUserUID', 'integer', 'UID of the FrontendUser which should get displayed');
}
}
......@@ -25,12 +25,11 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
/**
* Checks if the user is online in slack
*
* @param int $frontendUserUID
* @return string
*/
public function render($frontendUserUID)
public function render()
{
$feUser = $this->slackFrontendUserRepository->findByUid($frontendUserUID);
$feUser = $this->slackFrontendUserRepository->findByUid((int)$this->arguments['frontendUserUID']);
$slackUser = $this->slackUserRepository->findBySlackId($feUser->getSlackId());
if ($slackUser) {
......@@ -45,4 +44,13 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
}
return $status;
}
/**
* Initialize
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('frontendUserUID', 'integer', 'UID of the FrontendUser which should get displayed');
}
}
Markdown is supported
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