Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle case when default status is active and activate by group is ac…

…tive correctly
  • Loading branch information...
commit 63ca6cfb6114bba2432c2bc6e8cbc0780c3cc72d 1 parent 1fb775c
Vinai Kopp authored
7 app/code/community/Netzarbeiter/CustomerActivation/Helper/Data.php
View
@@ -225,11 +225,14 @@ public function getCustomerStoreId(Mage_Customer_Model_Customer $customer)
*/
public function getDefaultActivationStatus($groupId, $storeId)
{
- if (Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_BY_GROUP, $storeId)) {
+ $defaultIsActive = Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS, $storeId);
+ $activateByGroup = Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_BY_GROUP, $storeId);
+
+ if (! $defaultIsActive && $activateByGroup) {
$notActiveGroups = explode(',', Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS_GROUPS, $storeId));
$isActive = in_array($groupId, $notActiveGroups) ? false : true;
} else {
- $isActive = Mage::getStoreConfig(self::XML_PATH_DEFAULT_STATUS, $storeId);
+ $isActive = $defaultIsActive;
}
return $isActive;
Please sign in to comment.
Something went wrong with that request. Please try again.