Missing brackets in the first "if" statement in hook_user_logout leads to the conversion $token variable from string to boolean. Setcookie tries to clear cookie with name "mp_1_mixpanel" and actually do nothing.

Attached patch fixes it: I simply broke up code into two lines, so brackets are no longer needed.

CommentFileSizeAuthor
mixpanel-cookie_name_logout.patch566 bytesartem_sylchuk

Comments

artem_sylchuk’s picture

Issue summary: View changes

dsnopek’s picture

Status: Needs review » Fixed

Thanks for patch! I've just committed to the 7.x-1.x branch:

http://drupalcode.org/project/mixpanel.git/commitdiff/8e2e68ffa8165ee5bf...

I checked the 8.x-1.x branch and it already does something similar, so we should be good there. The 6.x-1.x branch doesn't even attempt to clear the cookie on logout.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.