Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25372 closed defect (bug) (fixed)

Replace use of global $user_id in favor of get_current_user_id()

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

To be consistent we should replace all calls to the global var $user_id with get_current_user_id().

Attachments (3)

25372.patch (9.0 KB) - added by ocean90 11 years ago.
First pass
25372.2.patch (6.4 KB) - added by ocean90 11 years ago.
query.diff (848 bytes) - added by layotte 11 years ago.
Fixed new bug from previous patch

Download all attachments as: .zip

Change History (9)

@ocean90
11 years ago

First pass

#1 @ocean90
11 years ago

  • Keywords has-patch added

wp-includes/comment-template.php is handled in #15508.

#2 @ocean90
11 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.7

@ocean90
11 years ago

#3 @ocean90
11 years ago

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

In 25669:

Replace use of global $user_ID in favor of get_current_user_id(). fixes #25372.

@layotte
11 years ago

Fixed new bug from previous patch

#4 @layotte
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Latest commit caused this bug http://l3w.us/i/TCl.png
Reopening, patch attached.

#5 @ocean90
11 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 25689:

Move get_current_user_id() call out of if-block, see [25669].

props layotte.
fixes #25372.

#6 @ocean90
11 years ago

#25481 was marked as a duplicate.

Note: See TracTickets for help on using tickets.