Update 'plugin.php'
This commit is contained in:
parent
bda3ae89e8
commit
9550a4fd2f
@ -53,8 +53,7 @@ function ldapauth_environment_check() {
|
|||||||
|
|
||||||
# Reroute login to yourls filter
|
# Reroute login to yourls filter
|
||||||
# (see https://github.com/YOURLS/YOURLS/wiki/Advanced-Hook-Syntax)
|
# (see https://github.com/YOURLS/YOURLS/wiki/Advanced-Hook-Syntax)
|
||||||
//yourls_add_filter( 'is_valid_user', 'ldapauth_is_valid_user' );
|
yourls_add_filter( 'is_valid_user', 'ldapauth_is_valid_user' );
|
||||||
yourls_add_filter( 'shunt_is_valid_user', 'ldapauth_is_valid_user' );
|
|
||||||
|
|
||||||
function ldapauth_shuffle_assoc($list) {
|
function ldapauth_shuffle_assoc($list) {
|
||||||
if (!is_array($list)) return $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_user_passwords[$username]='phpass:ThereIsNoPasswordButHey,WhoCares?';
|
||||||
}
|
}
|
||||||
yourls_set_user( $_SESSION['LDAPAUTH_AUTH_USER'] );
|
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 true;
|
||||||
return null;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ldapauth_debug($username . ' is not admin user.');
|
ldapauth_debug($username . ' is not admin user.');
|
||||||
|
Loading…
Reference in New Issue
Block a user