From 7f7def4b7f21fabf34b7921bbdc344cde9a9d88d Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 12 Jan 2021 14:44:05 +0100 Subject: [PATCH] Allow customer directlogin text Some people seem to want to have a custom direct login text. This allows them to set it. For now only via occ. But maybe some day we also add a GUI component to it. Signed-off-by: Roeland Jago Douma --- lib/Controller/SAMLController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index 16ba47f..161e5ae 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -492,9 +492,16 @@ class SAMLController extends Controller { $attributes = ['loginUrls' => []]; if ($this->SAMLSettings->allowMultipleUserBackEnds()) { + $displayName = $this->l->t('Direct log in'); + + $customDisplayName = $this->config->getAppValue('user_saml', 'directLoginName', ''); + if ($customDisplayName !== '') { + $displayName = $customDisplayName; + } + $attributes['loginUrls']['directLogin'] = [ 'url' => $this->getDirectLoginUrl($redirectUrl), - 'display-name' => $this->l->t('Direct log in') + 'display-name' => $displayName, ]; }