Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Replicate user photo from userphoto plugin across multisite blogs WordPress

I'm creating a network of sites using WP Multisite. When a user signs up they become part of every site, so they have one profile no matter which site they login to the backend of. They would then fill out their profile and add a picture. The ability to add a picture is enabled with the User Photo plugin on the profile page.

That picture is used to populate photo areas in two other plugins, Sidebar Login and Author Spotlight. All of this works fine on the site that the user signs up on (ie. I'm on fashion.mysite.com, I sign up, and add my photo. So when I'm on page fashion.mysite.com/submit, where I have the Sidebar Login plugin, I log in and my photo will be shown. Additionally if I was to create a post and publish it, I would see my photo on the Author Spotlight plugin, that resides on the single post page.

So all of this works fine when I am on the site that I created my profile from, but not on the other sites. Why? Because when I created my profile I did it from fashion.mysite.com/wp-admin/profile.php and that created a picture in folder blogs.dir/17/files/userphoto (17 is the blog id for fashion.mysite.com).

So now when I go to say design.mysite.com/submit, my photo should show up, but it doesn't because it's looking for the photo in blogs.dir/20/files/userphoto not blogs.dir/17/files/userphoto.

I can manually go in and copy the photo from fashion's dir to design's dir and then the photo shows up on both plugins on design.tawesome.com.


I need a way to either have the photo be created in every blog's userphoto directory or somehow have the two plugins that use the photo look for the photo in any of the blog's userphoto directories.

Answers (2)

2011-01-22

Eugen Oprea answers:

I can help.


Keith Fawcett comments:

Hey Eugen,

Can you expand on how you can help? Would you hack the code of the plugin or create another script to check all directories and copy photos to the others, etc?

What is your experience/prior work in customizing projects like this?

Thanks!

2011-01-25

S├ębastien | French WordpressDesigner answers:

<blockquote>They would then fill out their profile and add a picture</blockquote>
what this function ? Is it a plugin ?


Keith Fawcett comments:

The plugin is "User Photo." User Photo when activated adds a file upload on the user-edit.php page in wp-admin.


Keith Fawcett comments:

Sebastien, is this something you can do?