[buddypress-dev] Profile Data Missing

Beau Lebens beau at dentedreality.com.au
Thu May 15 16:46:52 GMT 2008


Isn't one of the restrictions in BP one user = one blog? (if not, it  
should be :)

But what you're saying sounds right Jerome. Let's follow it through...

It looks like the profile page (index.php) uses  
the_profile_field_value() to output a value.

That uses the data stored in a global called $field, which I think is  
populated somewhere along the line during a call like this:

$this->group->fields[$i] = new BP_XProfile_Field( $this->group->fields 
[$i]->id, $this->user_id );

$this->user_id at that point appears to have been populated during  
the creation of that object, using a global called $authordata. That  
appears to be set via WPMU (not BP), and only ever uses $post- 
 >post_author (probably in this case via setup_postdata() ?).

It looks like all of this triggered via a single-post query/loop in  
bp-xprofile.php::xprofile_profile_template() which theoretically  
should allocate the $authordata over to the author of any posts on  
that blog...

Which leads me to a question - are there *any* posts on those blogs  
that are not showing their profile properly? I haven't done a lick of  
testing or even run BP to see this problem in action, but following  
this thread it would seem like if there were no posts in a blog yet,  
then the author would never get allocated properly (and thus their  
profile data would not be loadable).

Anyone?

Beau


On May 15, 2008, at 7:43 AM, Jerome wrote:

> I suspect the function renders the profile takes the logged user's  
> id by mistake, it is supposed to take the id of the user belongs to  
> the blog, but the same question I asked before here, which user of  
> the blog will it pick? you know that a blog could have many users,  
> many admins...
>
> On Thu, May 15, 2008 at 4:11 PM, Bryan Phelps  
> <bryanphelps at gmail.com> wrote:
> I'm talking about on the output though, not the backend.  If I'm  
> logged in as John Doe and then visit other people's outputted  
> profile pages, all the profiles show John Doe's info.  The blog  
> title, etc. is right but the "basic" information and the extra  
> profile fields I added all show John Doe's stuff.  If I'm logged  
> out, nobody's info shows up.
>
>
>
> On Thu, May 15, 2008 at 7:06 AM, Andrea <sillyandrea at gmail.com> wrote:
> I think I know what you mean. It's part of how MU itself works. If  
> I'm logged in as Site Admin and go to any member blog, visiting the  
> profile area will always show my details.
>
> Andrea
>
>
> Bryan Phelps wrote:
> Sorry...one more thing.  I logged in as profile1 and the data shows  
> up.  But when i look at other profiles while logged in as profile1,  
> it shows me my information from profile1 instead of the information  
> that should be in the other profiles.  Kind of hard to explain...
>
> -- 
> Follow me on my various websites:
> http://atypicalife.net/blog/  personal anecdotes from our days
> http://homeschooljournal.net/ free blogs for homeschoolers
> http://wpmututorials.com/     tutorials for WordpressMU
> http://atypicalshops.com/     where you can buy our stuff. Opening  
> soon!
>
>
> _______________________________________________
> buddypress-dev mailing list
> buddypress-dev at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/buddypress-dev
>
>
> _______________________________________________
> buddypress-dev mailing list
> buddypress-dev at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/buddypress-dev
>
>
> _______________________________________________
> buddypress-dev mailing list
> buddypress-dev at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/buddypress-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/buddypress-dev/attachments/20080515/2bb4e088/attachment-0001.htm


More information about the buddypress-dev mailing list