The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

wp_authenticate override failing (1 post)

  1. tomviolin
    Posted 3 years ago #

    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!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wpDirAuth
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic