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.
| Comment | File | Size | Author |
|---|---|---|---|
| mixpanel-cookie_name_logout.patch | 566 bytes | artem_sylchuk |
Comments
Comment #1
artem_sylchukComment #3
dsnopekThanks 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.