Skip to:
Content

BuddyPress.org

Changeset 9055


Ignore:
Timestamp:
09/29/2014 06:02:19 PM (12 years ago)
Author:
r-a-y
Message:

bp-legacy: Properly clear cookies when logging out.

When a user logs out, buddypress.js attempts to clear all cookies. However,
this now fails with BP 2.1.

The problem is when we enqueued our JS assets (#5208), we upgraded
jquery.cookie to 1.4.1. v1.4.1 uses a new routine to clear cookies.

This commit updates our clear cookies calls to this updated routine.

Fixes #5909 (2.1-branch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/src/bp-templates/bp-legacy/js/buddypress.js

    r9044 r9055  
    15591559        /* Clear BP cookies on logout */
    15601560        jq('a.logout').on( 'click', function() {
    1561                 jq.cookie('bp-activity-scope', null, {
     1561                jq.removeCookie('bp-activity-scope', {
    15621562                        path: '/'
    15631563                });
    1564                 jq.cookie('bp-activity-filter', null, {
     1564                jq.removeCookie('bp-activity-filter', {
    15651565                        path: '/'
    15661566                });
    1567                 jq.cookie('bp-activity-oldestpage', null, {
     1567                jq.removeCookie('bp-activity-oldestpage', {
    15681568                        path: '/'
    15691569                });
     
    15711571                var objects = [ 'members', 'groups', 'blogs', 'forums' ];
    15721572                jq(objects).each( function(i) {
    1573                         jq.cookie('bp-' + objects[i] + '-scope', null, {
     1573                        jq.removeCookie('bp-' + objects[i] + '-scope', {
    15741574                                path: '/'
    15751575                        } );
    1576                         jq.cookie('bp-' + objects[i] + '-filter', null, {
     1576                        jq.removeCookie('bp-' + objects[i] + '-filter', {
    15771577                                path: '/'
    15781578                        } );
    1579                         jq.cookie('bp-' + objects[i] + '-extras', null, {
     1579                        jq.removeCookie('bp-' + objects[i] + '-extras', {
    15801580                                path: '/'
    15811581                        } );
Note: See TracChangeset for help on using the changeset viewer.