From 9550a4fd2fc2838f9fb890f66f3811aec757976f Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Wed, 12 Apr 2023 12:00:04 +0200 Subject: [PATCH] Update 'plugin.php' --- plugin.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin.php b/plugin.php index 0cc1110..902e17e 100644 --- a/plugin.php +++ b/plugin.php @@ -53,8 +53,7 @@ function ldapauth_environment_check() { # Reroute login to yourls filter # (see https://github.com/YOURLS/YOURLS/wiki/Advanced-Hook-Syntax) -//yourls_add_filter( 'is_valid_user', 'ldapauth_is_valid_user' ); -yourls_add_filter( 'shunt_is_valid_user', 'ldapauth_is_valid_user' ); +yourls_add_filter( 'is_valid_user', 'ldapauth_is_valid_user' ); function ldapauth_shuffle_assoc($list) { if (!is_array($list)) return $list; @@ -104,8 +103,7 @@ function ldapauth_is_valid_user( $value ) { $yourls_user_passwords[$username]='phpass:ThereIsNoPasswordButHey,WhoCares?'; } yourls_set_user( $_SESSION['LDAPAUTH_AUTH_USER'] ); - //return true; //modified 12.04.2023 by vmario. function must return null to match shunt_is_valid_user in functions-auth.php - return null; + return true; } else { ldapauth_debug($username . ' is not admin user.');