[wp-trac] [WordPress Trac] #15173: duplicate calls to 'add_new_user_to_blog'

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 20 17:52:05 UTC 2010


#15173: duplicate calls to  'add_new_user_to_blog'
-------------------------+--------------------------------------------------
 Reporter:  sboisvert    |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Multisite    |     Version:                 
 Severity:  minor        |    Keywords:                 
-------------------------+--------------------------------------------------
 It seems that there is a default filter in ms-default-filters:
 add_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );

 That calls the add user to blog on wpmu_activate_user action. That in
 itself is fine but wpmu_activate_signup() has this code:

 add_new_user_to_blog( $user_id, $user_email, $meta );
 do_action('wpmu_activate_user', $user_id, $password, $meta);
 (line 831-832 ms-functions.php current trunk);

 That means that the default behavior is to call add_new_user_to_blog
 twice. This triggers the actions attached to add_user_to_blog to fire
 twice.
 While removing the action works for me, I question if this is the intended
 or expected behavior of most users and would offer that this behavior
 should be debated.

 Thank you,

 Stéphane

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15173>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list