Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app/code/core/Mage/Customer/controllers/AccountController.php
- 00192 public function createPostAction()
- {
- 00241 if (true === $validationResult) {
- 00242 $customer->save();
- 00243 // Do your custom Code here to match the domains you want to make Confirmation Required for them.
- $patterns = array('@foo.com','@boo.com','@bar.com');
- $patterns_flattened = implode('|', $patterns);
- if ( preg_match('/'. $patterns_flattened .'/i', $customer->getEmail(), $matches) )
- { $customer->setIsConfirmationRequired(true);
- }
- 00244 if ($customer->isConfirmationRequired()) {
- 00245 $customer->sendNewAccountEmail('confirmation', $this->_getSession()->getBeforeAuthUrl());
- 00246 $this->_getSession()->addSuccess($this->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please <a href="%s">click here</a>.',
- 00247 Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail())
- 00248 ));
- 00249 $this->_redirectSuccess(Mage::getUrl('*/*/index', array('_secure'=>true)));
- 00250 return;
- 00251 }
- 00252 else {
- 00253 $this->_getSession()->setCustomerAsLoggedIn($customer);
- 00254 $url = $this->_welcomeCustomer($customer);
- 00255 $this->_redirectSuccess($url);
- 00256 return;
- 00257 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement