Make WordPress Core

Opened 11 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 Owned by: kjbenk
Priority: normal Milestone: 4.6
Component: Users Version:
Severity: normal Keywords:
Cc: Focuses: docs

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 11 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
11 years ago

  • Keywords good-first-bug added
  • Milestone Awaiting ReviewFuture 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 11 years ago by ericlewis (previous) (diff)

@kjbenk
11 years ago

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

#2 @kjbenk
11 years ago

  • Keywords has-patch added; needs-patch removed

#3 @DrewAPicture
11 years ago

  • Owner set to kjbenk
  • Status newassigned

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

  • Resolutionfixed
  • Status assignedclosed

In 37315:

Users: Correct inline docs for cookie expiration.

Props kjbenk.
Fixes #35568.

#6 @ericlewis
10 years ago

  • Keywords has-patch removed
  • Milestone Future Release4.6
Note: See TracTickets for help on using tickets.