[wp-trac] [WordPress Trac] #39385: Set $current_user global in wp_signon() after successful authentication

WordPress Trac noreply at wordpress.org
Wed Aug 29 11:45:22 UTC 2018


#39385: Set $current_user global in wp_signon() after successful authentication
------------------------------------+------------------------------
 Reporter:  fjarrett                |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  needs-patch close       |     Focuses:
------------------------------------+------------------------------

Comment (by dotancohen):

 This is not a documentation error for the simple reason that the wp_login
 action does not have the current user set, even though it ostensibly
 "Fires after the user has successfully logged in".

 The current patches don't use the core Wordpress function for setting the
 current user, even though it pretty much does the same thing. I feel that
 the attached patch is better from a maintainability standpoint by using
 the appropriate WP API. It is also updated to the current WP code base
 (just different line numbers in the diff, though).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39385#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list