Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#35568 closed defect (bug) (fixed)

Incorrect documentation for the set_auth_cookie/set_logged_in_cookie actions

Reported by: dd32's profile dd32 Owned by: kjbenk's profile kjbenk
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: docs Cc:

Description

The set_auth_cookie and set_logged_in_cookie actions have a $expire and $expiration parameter whose description is slightly off.

The descriptions describe it as being the number of seconds the cookie will live (say, 3600) but it's actually passed as the timestamp that it'll expire at - time() + 3600 (or in the case of $expire it may also be 0 for no-grace-period).

It looks like this might be based on the auth_cookie_expiration filter documentation (in which it would be 3600).

Attachments (2)

35568.diff (3.0 KB) - added by kjbenk 10 years ago.
Here is patch I created for this ticket. This is my first patch...ever so please bare with me :)
35568.2.diff (3.0 KB) - added by ericlewis 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @ericlewis
10 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

Looks like this also affects documentation for wp_generate_auth_cookie() and the auth_cookie action.

This is a great first bug if anyone's looking to contribute to documentation!

Last edited 10 years ago by ericlewis (previous) (diff)

@kjbenk
10 years ago

Here is patch I created for this ticket. This is my first patch...ever so please bare with me :)

#2 @kjbenk
10 years ago

  • Keywords has-patch added; needs-patch removed

#3 @DrewAPicture
10 years ago

  • Owner set to kjbenk
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed".

@ericlewis
10 years ago

#4 @ericlewis
10 years ago

  • Keywords good-first-bug removed

@kjbenk great job on your first patch! I cleaned up a few white space issues and changed a bit of copy.

#5 @ericlewis
10 years ago

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

In 37315:

Users: Correct inline docs for cookie expiration.

Props kjbenk.
Fixes #35568.

#6 @ericlewis
10 years ago

  • Keywords has-patch removed
  • Milestone changed from Future Release to 4.6
Note: See TracTickets for help on using tickets.