Support » Plugins » Hacks » Universal Login for 13 Blogs

Viewing 15 replies - 1 through 15 (of 42 total)
  • It’d be much less trouble (and hacking) to just setup one multisite install. Multisite uses a global users table by default, and allows you to run all sites off the same WordPress core files (easier upgrades).

    If setting up multisite with subdomains is too complex, you can use a subdirectory structure with the Domain Mapping plugin.

    Leave file “wp-includes/capabilities.php” unmodified,

    choose one “main blog installation” which will hold users data,

    fill in every other blog “wp-config.php” file data of main blog

    define('CUSTOM_USER_TABLE', 'MainBlogPrefix_users');
    define('CUSTOM_USER_META_TABLE', 'MainBlogPrefix_usermeta');

    and as a final step install on all blogs plugin “WP Orphanage” which will care about User Roles

    Plugin URL: http://wordpress.org/extend/plugins/wp-orphanage/

    meloniq thank you so much, works like a charm.

    Hey meloniq, would you possibly know how to fix the cookies issue. When I visit the other sub-domains I’m still prompted to log in. How would I be able to make it so that members are kept logged in even if they visit the other sub-domains? I couldn’t find any plugins related to this.. so I figured I would ask you, or anyone else that might know the solution. Thanks in advance.

    Hi,

    Include in all “wp-config.php” files value (replace value with Your domain name – not subdomain, “dot prefix” is important)

    define('COOKIE_DOMAIN', '.YourDomain.Com');

    And the same keys to all “wp-config.php” files, You can generate it on this site:
    https://api.wordpress.org/secret-key/1.1/salt/

    define('AUTH_KEY',         'XYZ');
    define('SECURE_AUTH_KEY',  'XYZ');
    define('LOGGED_IN_KEY',    'XYZ');
    define('NONCE_KEY',        'XYZ');
    define('AUTH_SALT',        'XYZ');
    define('SECURE_AUTH_SALT', 'XYZ');
    define('LOGGED_IN_SALT',   'XYZ');
    define('NONCE_SALT',       'XYZ');

    Clear cookies in web browser for Your website(s) and check hows working now;)

    Okay I’ll get on it right now.. one thing though, all wp installations are in subdomains, there is no wp installation on the root, would `define(‘COOKIE_DOMAIN’, ‘.jobortunity.ca’);
    ` still work on all sub-domains?

    Yes, in Your case it should be:

    define('COOKIE_DOMAIN', '.jobortunity.ca');

    Okay, I’ve generated new keya, and added same salt keys to all wp-config files, and also added define(‘COOKIE_DOMAIN’, ‘.jobortunity.ca’);

    I decided to test on two sub-domains, activated the stock themes wordpress comes with:

    http://on.jobortunity.ca & http://ab.jobortunity.ca

    Cleared my cookies, via ccleaner for all my browsers. Logged in to Ontario, but when I visit Alberta, I still need to log in. Any suggestions?

    Hey Meloniq,

    First I want to say: nice post !

    I did what you wrote, but I have a question (or 2)

    Is it necessary to use “WP Orphanage”? I use role scope allready…
    On my second site I can only NOT log in anymore: http://stoofvlees.eu/wp-login.php?redirect_to=http%3A%2F%2Fstoofvlees.eu%2Fwp-admin%2Fprofile.php&reauth=1
    Any suggestions?

    Thank you!

    Or somebody else know what I can do?

    Hi Sven01,

    I don’t know this second one plugin, don’t know how it works…
    If You are not a admin on second blog (cant access administrative panel), open phpMyAdmin and change roles to administrator for this user.

    Hi Meloniq,

    You are quick to answer 🙂
    I am admin for both blogs, and I could login before I changed the settings.
    Now it redirects me to the login page after I tried to login.

    Just redirect? or there is some information whats wrong?
    Try to use other web browser or clear cookies

    I tried ie, googlechrome and opera 🙁
    on g-chrome it gives me this in my browserwindow: http://stoofvlees.eu/wp-login.php?redirect_to=http%3A%2F%2Fstoofvlees.eu%2Fwp-admin%2Fprofile.php&reauth=1 and a new login screen.
    I just want that my users have 1 login for all my blogs and if possible that they kept login when they change blog.
    I did change :
    define(‘AUTH_KEY’, ‘XYZ’);
    define(‘SECURE_AUTH_KEY’, ‘XYZ’);
    define(‘LOGGED_IN_KEY’, ‘XYZ’);
    define(‘NONCE_KEY’, ‘XYZ’);
    define(‘AUTH_SALT’, ‘XYZ’);
    define(‘SECURE_AUTH_SALT’, ‘XYZ’);
    define(‘LOGGED_IN_SALT’, ‘XYZ’);
    define(‘NONCE_SALT’, ‘XYZ’);

    with the same values ass my primary site, can this be the problem?

    Whats Your second WordPress installation URL?
    Did You add on “slave” installation to wp-config these lines?

    define('CUSTOM_USER_TABLE', 'MainBlogPrefix_users');
    define('CUSTOM_USER_META_TABLE', 'MainBlogPrefix_usermeta');

    If You can’t login perhaps You missed lines above, if You can’t access “wp-admin” perhaps You are “Orphan” (user without roles)

    I did uninstall and re-install, now I can login, but I still have different logins for the blogs 🙂
    first is 4lol.eu and second stoofvlees.eu , still more blogs waiting, but first these 2 must work good …

Viewing 15 replies - 1 through 15 (of 42 total)
  • The topic ‘Universal Login for 13 Blogs’ is closed to new replies.