Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#25372 closed defect (bug) (fixed)

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

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

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 13 years ago.
First pass
25372.2.patch​ (6.4 KB ) - added by ocean90 13 years ago.
query.diff​ (848 bytes ) - added by layotte 13 years ago.
Fixed new bug from previous patch

Download all attachments as: .zip

Change History (9)

@ocean90
13 years ago

First pass

#1 @ocean90
13 years ago

  • Keywords has-patch added

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

#2 @ocean90
13 years ago

  • Keywords commit added
  • Milestone Awaiting Review → 3.7

#3 @ocean90
13 years ago

  • Owner set to ocean90
  • Resolution → fixed
  • Status new → closed

In 25669:

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

@layotte
13 years ago

Fixed new bug from previous patch

#4 @layotte
13 years ago

  • Resolution fixed
  • Status closed → reopened

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

#5 @ocean90
13 years ago

  • Resolution → fixed
  • Status reopened → closed

In 25689:

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

props layotte.
fixes #25372.

#6 @ocean90
13 years ago

#25481 was marked as a duplicate.

Note: See TracTickets for help on using tickets.