Fix ldapauth_authorized_admins logic

ldapauth_is_valid_user must return boolean type. Thanks @pjaydev
This commit is contained in:
K3A 2019-10-29 17:56:16 +00:00 committed by GitHub
parent 2a3cb0334b
commit c4ad990ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -154,7 +154,8 @@ function ldapauth_is_valid_user( $value ) {
yourls_set_user( $_SESSION['LDAPAUTH_AUTH_USER'] );
return true;
} else {
return $username.' is not admin user.';
ldapauth_debug($username . ' is not admin user.');
return $value;
}
} else if ( isset( $_REQUEST['username'] ) && isset( $_REQUEST['password'] )
&& !empty( $_REQUEST['username'] ) && !empty( $_REQUEST['password'] ) ) {