You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sorry my mistake, I am use too much to PHP and WP, so steep learning curve for me.
I suggest better and simpler check based on WP_User object, this should do the trick:
function authLdap_login($user, $username, $password, $already_md5 = false)
{
// don't do anything when authLDAP is disabled
if (! authLdap_get_option('Enabled')) {
authLdap_debug('LDAP disabled in AuthLDAP plugin options (use the first option in the AuthLDAP options to enable it)');
return $user;
}
if (isset($user) && $user->ID) {
return $user;
}
authLdap_debug("User '$username' logging in");
As for the rest of the answer why not provide configurable options of fallback? i.e. if user is already authenticated by previous hook would you really like to force http auth anyway?
This adds code that honors an already successfull authentication.
As the first parameter to the login-function is either "NULL" when no
authentication attempt has happened or WP_Error when a previous
login-attempt has failed or WP_User when a previous login-attempt
already has been successfull. Therefore when the first parameter is an
instance of WP_USer we now instantly return that instance without
further processing.
This has been reported in issue #81 by
[litinoveweedle](https://github.com/litinoveweedle)
This is an issue reported at https://wordpress.org/support/topic/authldap-doesnt-work-with-other-auth-plugins.
The text was updated successfully, but these errors were encountered: