Skip to content

Instantly share code, notes, and snippets.

@Vinai
Created September 12, 2014 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vinai/4a3ec1ca6055e855d426 to your computer and use it in GitHub Desktop.
Save Vinai/4a3ec1ca6055e855d426 to your computer and use it in GitHub Desktop.
Programatically activate all customers of a specific customer group for the Magento CustomerActivation extension found at https://github.com/Vinai/customer-activation
<?php
$groupId = 1;
Mage::getResourceModel('customer/customer_collection')
->addAttributeToFilter('group_id', $groupId)
->setDataToAll('customer_activated', 1)
->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment