Skip to:

Synchronization of information

  • b4ureye


    Hello ,

    I have a wordpress site like and the other I created a subfolder to install

    So if a user registers on the main site, he will be automatically registered on the pro subfolders! (until then everything is working fine !

    i use this code :

     * @package Kinsta_Share_Users
     * @version 1.0
    Plugin Name: Kinsta_Share_Users
    Plugin URI:
    Description: This is an plugin for Kinsta_Share_Users blog readers
    Author: Carlo Daniele
    Version: 1.0
    Author URI:
     * Duplicate {$pref}_capabilities and {$pref}_user_level rows in {$pref}_usermeta table
     * @param int    $user_id   The user ID.
     * @param string $role      The new role.
     * @param array  $old_roles An array of the user's previous roles.
     * @link
     * @link
    function ksu_save_role( $user_id, $role ) {
    	// Change value if needed
    	$prefix_1 = 'first_';
    	// Change value if needed
    	$prefix_2 = 'second_';
    	$caps = get_user_meta( $user_id, $prefix_1 . 'capabilities', true );
    	$level = get_user_meta( $user_id, $prefix_1 . 'user_level', true );
    	if ( $caps ){
    		update_user_meta( $user_id, $prefix_2 . 'capabilities', $caps );
    	if ( $level ){
    		update_user_meta( $user_id, $prefix_2 . 'user_level', $level );
    add_action( 'set_user_role', 'ksu_save_role', 10, 2 );

    Now I would like if the user adds a profile or cover photo on the main site it adds on the pro site too!

    In good term if the user updates his pphoto on a site the other site automatically updates and so on.

  • You must be logged in to reply to this topic.
Skip to toolbar