[wp-trac] [WordPress Trac] #63230: Correct expriation time documentation for `wp_set_auth_cookie()`

WordPress Trac noreply at wordpress.org
Thu Apr 3 21:32:29 UTC 2025


#63230: Correct expriation time documentation for `wp_set_auth_cookie()`
------------------------------------+--------------------
 Reporter:  peterwilsoncc           |      Owner:  (none)
     Type:  defect (bug)            |     Status:  new
 Priority:  normal                  |  Milestone:  6.9
Component:  Login and Registration  |    Version:
 Severity:  normal                  |   Keywords:
  Focuses:  docs                    |
------------------------------------+--------------------
 The docs for `wp_set_auth_cookie()` indicate that without "Remember me"
 checked, the login cookie is set to expire after two days.

 This is incorrect, logins that are set to be forgotten are set as session
 cookies to expire once the browser is closed. This is in line with
 industry standards.

 Additionally the filter `auth_cookie_expiration` is fired for logins set
 to be forgotten but the value returned by the filter is ignored by
 WordPress. The second instance of the filter should be removed from the
 function [https://core.trac.wordpress.org/browser/tags/6.7.2/src/wp-
 includes/pluggable.php?marks=991#L991 (code ref)].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63230>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list