[wp-trac] [WordPress Trac] #39903: is_user_logged_in() true on ajax after cookie has been deleted
WordPress Trac
noreply at wordpress.org
Wed Jan 10 07:36:30 UTC 2018
#39903: is_user_logged_in() true on ajax after cookie has been deleted
--------------------------+------------------------------
Reporter: esemlabel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.7.2
Severity: major | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Comment (by ronald_edelschaap):
No, in this case the visitor/user wasn't allowed to visit {{{/wp-
admin/}}}. Just checked, when visiting {{{/wp-admin/}}}, the browser get's
redirected to {{{/wp-login.php}}}.
We also logged the results of both {{{is_user_logged_in()}}} and
{{{wp_get_current_user()}}}. In case of an AJAX call, these functions
resulted in resp. {{{true}}} and a {{{WP_User}}} object containing the
user data of the user which was logged in before clearing the cookies. In
case of a regular call, these functions resulted in resp {{{false}}} and
an empty {{{WP_User}}} object.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39903#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list