Mass unsubscribe

Discussion in 'Installation' started by bennyuk1, Dec 15, 2017.

Thread Status:
Not open for further replies.
  1. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    I need to unsubscribe a product from a few hundred users.
    Is there a way to do this, either in amember or sql command?

    This would be a great feature to add to amember, similar to mass subscribe.

    Thanks
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello,

    Do you have recurring subscriptions associated with this product? If not, then you can use this SQL query to expire all access:
    Code:
    UPDATE am_access SET expire_date = DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) WHERE expire_date >= DATE(NOW()) AND product_id = 1;
    You need replace 1 in query above with actual ID of your product.

    Then ran rebuild core database:
    aMember CP -> Utilities -> Rebuild Db -> (Rebuild Core Database)

    Best Regards.
  3. bennyuk1

    bennyuk1 aMember Pro Customer

    Joined:
    Jan 12, 2012
    Messages:
    200
    Many thanks
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You are welcome!
Thread Status:
Not open for further replies.

Share This Page