Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19146 closed defect (bug) (fixed)

Remove $user_identity global usage in admin-bar.php

Reported by: duck_'s profile duck_ Owned by: nacin's profile nacin
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Used by the "My Account" menu, see [16077], the $user_identity global is back compat / 'deprecated' and we shouldn't use it, especially when we now have the full $current_user object via wp_get_current_user() anyway.

See [3566] for "Setup global user vars. Used by set_current_user() for back compat."

Patch also makes use the local $user_id variable instead of re-calling get_current_user_id() again.

Attachments (2)

19146.diff (1.1 KB) - added by duck_ 13 years ago.
19146.2.diff (1.5 KB) - added by duck_ 13 years ago.

Download all attachments as: .zip

Change History (4)

@duck_
13 years ago

@duck_
13 years ago

#1 @nacin
13 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [19284]:

Don't use $user_identity global. props duck_. fixes #19146.

#2 @nacin
13 years ago

  • Milestone changed from Awaiting Review to 3.3
Note: See TracTickets for help on using tickets.