From ffd129c4bfe518f7c031e57d81e206852aef9cd7 Mon Sep 17 00:00:00 2001
From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de>
Date: Wed, 21 Sep 2022 10:23:59 +0000
Subject: [PATCH] allow access if ENABLE_REQUEST_NEW_PASSWORD_BY_USER is false,
 fixes #513

Closes #513

Merge request studip/studip!1019
---
 app/controllers/new_password.php | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/controllers/new_password.php b/app/controllers/new_password.php
index e957f1dd725..5132c4804f2 100644
--- a/app/controllers/new_password.php
+++ b/app/controllers/new_password.php
@@ -13,9 +13,7 @@ class NewPasswordController extends StudipController
     {
         parent::before_filter($action, $args);
 
-        if (!(Config::get()->ENABLE_REQUEST_NEW_PASSWORD_BY_USER
-            && in_array('Standard', $GLOBALS['STUDIP_AUTH_PLUGIN'])
-        )) {
+        if (!in_array('Standard', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
             PageLayout::postError(_("Das Anfordern eines neuen Passwortes durch den Benutzer ist in dieser Stud.IP-Installation nicht möglich."));
             $this->redirect('start');
             return;
@@ -97,7 +95,7 @@ class NewPasswordController extends StudipController
             $user_id = $token->user_id;
         } else {
             PageLayout::postError('Der Link ist abgelaufen oder wurde bereits verwendet. Fordern sie eine neue Mail an!');
-            $this->redirect('start');
+            $this->redirect('new_password');
             return;
         }
 
-- 
GitLab