When to load auto-login code?

I ended up using the ‘plugins_loaded’ action or state from http://codex.wordpress.org/Plugin_API/Action_Reference: In my main plugin file I have: include_once( ‘lib/class-my-auth.php’ ); // your class file here add_action( ‘plugins_loaded’, ‘My_Auth::auto_login’ ); In lib/class-my-auth.php: <?php class My_Auth { private static $successfully_connected_Main_to_WP = false; public static function auto_login() { $username = …; // Integrate with main site to … Read more

How Access Multiple WordPress sites with a single login

In both wp-config.php files, change the following defines: define(‘COOKIE_DOMAIN’, ‘.test.oursite.com’); define(‘COOKIEHASH’, md5(‘test.oursite.com’)); to: define(‘COOKIE_DOMAIN’, ‘.oursite.com’); define(‘COOKIEHASH’, md5(‘oursite.com’)); Go to test.oursite.com/wp-admin/ and login as an administrator. Go to Users -> Your Profile and click on Update Profile button. Now go to forums.oursite.com/wp-admin/. You should be logged in there. If synchronization plugins in mu-plugins for both sites … Read more

Is it possible to have a network of BuddyPress sites, a-la WordPress MU, with single-sign-on? [closed]

BuddyPress is compatible with a WordPress Multisite setup. There are several different ways to set it up. By default, BuddyPress data is stored in a networkwide way. Generally, that means that, within the network of sites, only one site is dedicated to BuddyPress features/content – you might think of this as the “community” site within … Read more

Bypassing wp_signon with a cookie that I have

Don’t need no cookies. WordPress automatically bypasses it for you if you pass an user (the one you need to login) object, fire this function on init (I think): $user_to_login = get_user_by( ‘id’, 1 ); // Check if user exists if( $user_to_login ) { wp_set_auth_cookie( $user_to_login->ID, False ); /** * Fire up the login process. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)