Support » Plugin: wpDirAuth » wp_authenticate override failing

  • I upgraded to 3.5 of WordPress. Shortly after that the wpDirAuth plugin stopped working. It claimed that another plugin was overriding the wp_authenticate or wp_cookie functions.

    A quick recursive grep revealed that in fact no other plugins even referred to wp_authenicate, much less overrided them.

    A quick search of WP source code also revealed that the wp_setcookie function no longer seems to exist as a pluggable function, or anywhere else.

    So I made the following changes to the source:

    Line 134 of wpDirAuth.php: changed safe mode check to no longer check to see if wp_authenticate or wp_setcookie are already defined:

    if (!function_exists('ldap_connect')) {

    Line 1096: added a line and changed a line: added the add_filter, changed the name of the function to wpdirauth_authenticate, and added the $junk parameter.

    add_filter('authenticate','wpdirauth_authenticate', -1, 3);
    function wpdirauth_authenticate($junk, $username, $password)

    It works now!

  • The topic ‘wp_authenticate override failing’ is closed to new replies.