• I’m using WordPress MU 2.9.1.1 and ext_db_auth 3.12. The plugin works to allow users to login to the root blog (http://www.classcaster.net/), but fails to allow logins to child blogs (http://anotherblog.classcaster.net/). I’ve tried this with multiple versions of WPMU and the plugin and placing the plugin in either the plugins or mu-plugins directory and the result is always the same. The settings for the plugin do not transfer forward to new blogs that are created. It is important to me that logins on the child blogs are authenticated against the external database. Any suggestions on how to get the values to roll forward as new blogs are created?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The settings for the plugin do not transfer forward to new blogs that are created.

    And in any plugin that has particular settings on an options page, they never will transfer to new blogs, unless you actually hardcode those values in the plugin itself.

    Thread Starter emasters

    (@emasters)

    unless you actually hardcode those values in the plugin itself.

    I tried that but it didn’t work. Another post had suggested that it was necessary to add a set of defaults to the plugin that matched the values needed to connect to the external database, so I added the values, but they don’t show up when a new blog is created.

    Thread Starter emasters

    (@emasters)

    I solved my problem by adding the default values I needed to schema.php and activated the plugin site wide. Now when a new blog gets created the appropriate values get added to the options table for that blog.

    May I ask how you added the default values? In a function or simply declare the value of variable? I am new to wpmu and wanted to get the external db working before we push it out..

    Thanks in advance!

    I should have tried it out before asking.

    Simply add the values in the populate_options() function, and it will do the trick.

    it should look like this:
    'ext_db_type' => 'MySQL',

    Thanks for pointing out the schema.php again!

    Thread Starter emasters

    (@emasters)

    And remember to not overwrite schema.php in an upgrade! 🙂

    Here’s an example of what to add, just put this in the populate_options() function.

    //ex_db_auth defaults
    	'ext_db_type'=>'MySQL',
    	'ext_db_mdb2_path'=>'',
    	'ext_host'=>'localhost',
    	'ext_db_port'=>'',
    	'ext_db'=>'drupal6',
    	'ext_db_user'=>'dbuser',
    	'ext_db_pw'=>'dbpassword',
    	'ext_db_table'=>'users',
    	'ext_db_namefield'=>'name',
    	'ext_db_pwfield'=>'pass',
    	'ext_db_first_name'=>'',
    	'ext_db_last_name'=>'',
    	'ext_db_user_url'=>'',
    	'ext_db_user_email'=>'mail',
    	'ext_db_description'=>'',
    	'ext_db_aim'=>'',
    	'ext_db_yim'=>'',
    	'ext_db_jabber'=>'',
    	'ext_db_enc'=>'MD5',
    	'ext_db_error_msg'=>'Please login using your Drupal website username and password.',
    	'ext_db_other_enc'=>'$password2 = $password;',
    	'ext_db_role_bool'=>'',
    	'ext_db_role'=>'',
    	'ext_db_role_value'=>'',

    The result is that every blog created gets these defaults with the ext_db_auth plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Trying to use External DB plugin with WordPress MU’ is closed to new replies.