Browse files

Use current frontend store if customer website_id isn't set

  • Loading branch information...
1 parent cb2a302 commit a4884e01f3778f31bdfcbc026402b737abba8884 @Vinai committed Jul 16, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/code/community/Netzarbeiter/CustomerActivation/Helper/Data.php
View
5 app/code/community/Netzarbeiter/CustomerActivation/Helper/Data.php
@@ -202,6 +202,11 @@ public function getCustomerStoreId(Mage_Customer_Model_Customer $customer)
$storeId = $store->getId();
}
}
+ // In case the website_id is not yet set on the customer, and the
+ // current store is a frontend store, use the current store ID
+ if (!$storeId && !Mage::app()->getStore()->isAdmin()) {
+ $storeId = Mage::app()->getStore()->getId();
+ }
}
return $storeId;
}

0 comments on commit a4884e0

Please sign in to comment.