Skip to:

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6550 closed enhancement (no action required)

set_current_user deprecated since WP 3.0

Reported by: modemlooper's profile modemlooper Owned by:
Milestone: Priority: low
Severity: minor Version: 2.3.2
Component: Core Keywords:

Change History (5)

#1 @DJPaul
9 years ago

Where, exactly? Are you getting it confused with the method of the same name in the unit test base class, which does use wp_set_current_user?

#2 @modemlooper
9 years ago

possibly, i haven't had a coffee yet :P

#3 @modemlooper
9 years ago

add_action( 'set_current_user', 'bp_setup_current_user', 10 );

shouldn't that be

add_action( 'wp_set_current_user', 'bp_setup_current_user', 10 );

#4 @johnjamesjacoby
9 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to fixed
  • Status changed from new to closed

The set_current_user action fires inside the wp_set_current_user() function, so even though it's a bit confusing and not ideal code architecture from upstream, BuddyPress's usage here is as required.

Searching the codebase for set_current_user() usages only brings up BackPress code, so BuddyPress also does not call either function directly; it's just along for the WordPress ride.

Even though this issue was a miss, thanks for keeping an eye out for stuff like this. I find it to be incredibly easy to miss when core deprecates and rearranges things, so it's good to call these out to give them a deeper look.

#5 @johnjamesjacoby
9 years ago

  • Resolution changed from fixed to invalid
Note: See TracTickets for help on using tickets.