Support » Plugins » [Plugin: External DB authentication] Small bug

  • $username = NULL;

    You need to add the above line at line 426 before the semicolon.

    else { //username exists but wrong password…
    global $ext_error;
    $ext_error = “wrongpw”;
    $username = NULL;

    Otherwise you can login with an old password in WPMU after it has been changed externally.

    Also I had to edit the ext_db_auth.php file and add default values because they blank out when new blogs are created. Here is my code (with default values added) that works with SMF (Simple Machines) 2.0 RC1-1 if anyone is interested.

    add_option(‘ext_db_type’,”MySQL”,”External database type”);
    add_option(‘ext_db_mdb2_path’,””,”Path to MDB2 (if non-standard)”);
    add_option(‘ext_host’,”localhost”,”External database hostname”);
    add_option(‘ext_db_port’,””,”Database port (if non-standard)”);
    add_option(‘ext_db’,”wpsmf”,”External database name”);
    add_option(‘ext_db_user’,”root”,”External database username”);
    add_option(‘ext_db_pw’,””,”External database password”);
    add_option(‘ext_db_table’,”smf_members”,”External database table for authentication”);
    add_option(‘ext_db_namefield’,”member_name”,”External database field for username”);
    add_option(‘ext_db_pwfield’,”passwd”,”External database field for password”);
    add_option(‘ext_db_enc’,”Other”,”Type of encoding for external db (default SHA1? or MD5?)”);
    add_option(‘ext_db_error_msg’,’Register a new account here.‘,”Custom login message”);
    add_option(‘ext_db_other_enc’,’$password2 = sha1(strtolower($username) . $password);’);

    I also see where you disabled the change password in WP; however, there is no error message or warnings. It states that the changes were saved. It’s not a biggee.

    Your script has saved me a lot of time in developing a new site! Thank you.

    Keith Tysinger

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this all that I would have to do to integrate my two databases? I can figure out how to change the links for registering and for logging in. I just want my users to only have to have on login. Thanks for any help.

    Hi Keith – Thanks for the heads up re: that line to insert. I’ve added it in. The one caveat that would need to be mentioned, though, is that if you don’t have an account called “admin” in that external table that default admin account for wordpress won’t authenticate properly. That kind of makes sense, though, from making *all* usernames externally pulled rather than an exception here and there. Right?

    Concerning your second point, could you give a bit more information? Are you using WPMU? And when do the defaults get blanked out, then? Just want to check to see if putting in default values makes sense in general for the released version, though I don’t *think* it quite does…

    Hoodie – depends on what you mean by “integrating,” I think. Please give a bit more detail, as this plugin focuses on using another, existing database for logins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: External DB authentication] Small bug’ is closed to new replies.