Viewing 1 replies (of 1 total)
  • Thread Starter haxxxton

    (@haxxxton)

    argh.. ok so i think i have solved it..

    i needed to do 2 extra things..

    in the non-main site.. ie the one at http://mysite.com/blog i needed to add the following to the wp-config.php file

    define('CUSTOM_USER_TABLE', 'pm_users');
    define('CUSTOM_USER_META_TABLE', 'pm_usermeta');

    obviously replace pm_ with the prefix of the database for the main section

    i had to update the _init_caps function in the capabilities.php file in wp-includes of the non-main site

    .. now before the code below i would STRONGLY advise AGAINST changing core files..

    function _init_caps( $cap_key = '' ) {
        global $wpdb;
    
        /* if ( empty($cap_key) )
            $this->cap_key = $wpdb->prefix . 'capabilities';
        else
            $this->cap_key = $cap_key; */ /*original */
        $this->cap_key = 'pm_capabilities'; /*modified code */
    
        $this->caps = get_user_meta( $this->ID, $this->cap_key, true );
    
        if ( ! is_array( $this->caps ) )
            $this->caps = array();
    
        $this->get_role_caps();
    }
Viewing 1 replies (of 1 total)
  • The topic ‘one login, two installs, one database, one domain’ is closed to new replies.