[buddypress-trac] [BuddyPress Trac] #5481: Buddypress should set user meta for single sites in bp_core_signup_user

buddypress-trac noreply at wordpress.org
Fri Mar 28 00:54:22 UTC 2014

#5481: Buddypress should set user meta for single sites in bp_core_signup_user
 Reporter:  StijnDeWitt   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.0
Component:  Core          |     Version:  1.9.2
 Severity:  minor         |  Resolution:
 Keywords:                |
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 2.0


 Hi StijnDeWitt - Thanks for the report and the thorough background

 > I consider the fact that BuddyPress attaches the meta for WPMU sites but
 not for single sites as a bug. Sorry if I'm wrong about that.

 You are wrong :) In non-MS, we create a user (with user_status = 2)
 immediately at registration time (ie, pre-activation), because non-MS WP
 does not have the concept of a "signup". Because we have a real user at
 that time, we are able to add the necessary xprofile data right there in
 bp_core_signup_user(). On Multisite, the WP user is only created at
 activation, so we do the same thing with xprofile data only at activation:
 members-functions.php#L1341. So, we really do use the $usermeta in more or
 less the same way on MS vs non-MS - just at different times in the

 A big fat caveat to the above explanation: this is all changed for BP 2.0.
 In the future, even non-MS sites will use wp_signups. So it'll be much
 more consistent and transparent for intrepid explorers like you :) See

 So anyway, back to your issue.

 >  If it would add the user meta that remains after updating the user's
 xprofile, before calling the action hook, I could just pass on the user's
 account type in the $usermeta argument to bp_core_signup_user and then in
 my bp_core_signup_send_activation_key hook check this meta

 This is a clever idea, but I think it needs some more research before we
 implement anything like it. It's possible that people are putting any
 manner of weird payload into this usermeta (via plugins, etc), so we
 shouldn't be assuming it's safe or wise to insert into wp_usermeta.

 > Alternatively, you could pass on the $usermeta parameter to the
 bp_core_signup_send_activation_key directly when calling apply_filters.

 Yes. I'm surprised we don't do this already. I'm going to make this fix
 right away. Please let me know if it's enough for your purposes.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5481#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list