[wp-trac] [WordPress Trac] #60868: Persistence layer tries to make a REST API call to '/wp/v2/users/me' when user is not logged in

WordPress Trac noreply at wordpress.org
Sat Mar 30 23:04:42 UTC 2024


#60868: Persistence layer tries to make a REST API call to '/wp/v2/users/me' when
user is not logged in
---------------------------+--------------------------------------------
 Reporter:  chamois_blanc  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  General        |     Version:  6.4.3
 Severity:  minor          |  Resolution:
 Keywords:  2nd-opinion    |     Focuses:  javascript, rest-api, privacy
---------------------------+--------------------------------------------

Comment (by chamois_blanc):

 Checking that the user is logged in could be as simple as:

 {{{
 const isLoggedIn = document.body.classList.contains('logged-in');
 }}}

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


More information about the wp-trac mailing list