Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#21982 closed enhancement (wontfix)

check wp_authenticate_cookie

Reported by: fitorec's profile fitorec Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: Users Keywords: has-patch
Focuses: Cc:

Description

I am analyzing the authentication system wordpress, caught my atension the function logic wp_authenticate_cookie in (wp-includes/user.php) and decided to make a very small change.

I made a file of changes:

https://gist.github.com/3774628

Attachments (1)

check_wp_authenticate_cookie.patch (596 bytes) - added by fitorec 12 years ago.

Download all attachments as: .zip

Change History (3)

#1 @johnbillion
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the patch fitorec, but we don't refactor code for the sake of refactoring. Please see http://make.wordpress.org/core/2011/03/23/code-refactoring/

Sorry you've not received a response until now.

#2 @nacin
11 years ago

While a future commit in this file will surely clean up the all-on-one-line if statement, we prefer returning early from functions whenever possible. The patch here would change that and make it less clear what happens when the function receives a WP_User.

Note: See TracTickets for help on using tickets.