• I did an LDAP plugin that overrides wp_login for 1.5.2 but it’s broken in WP2. Overriding:

    function wp_login($username, $password, $already_md5 = false)

    I get:

    Cannot redeclare wp_login() (previously declared in /PATH/wp-includes/pluggable-functions.php:171)

    is there anything I can try to sort it?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you the author of the plugin? If not, you’ll want to contact the author an have them recode it. A lotta functions and such were moved around and changed in WP2.x.

    Thread Starter stravaiger

    (@stravaiger)

    Yes, I’m the author. It seems to load ok though. I think it’s because wp_login has already been defined by the time I activate the LDAP plugin.

    Even though it’s loaded, when I login as my normal ldap user I have no rights to post anymore.

    I’ve changed it to use:
    $login = get_userdatabylogin($username);

    instead of the old db lookup and my rights in the database (10) are fine.

    I’ve also updated the LDAP version of wp_setcookie but I have no rights anymore!

    Would you have any ideas?

    thanks

    Thread Starter stravaiger

    (@stravaiger)

    Finally sussed the rights problem – it’s the md5 and the cookie so I need to change some LDAP code.

    For the record though – I wouldn’t recommend using the in-place editing of plugins. If there’s an error, you lose *all* your changes after the location where the error occurred!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP2 wp_login plugin broken’ is closed to new replies.