Disabling customer login & registration on checkout in Magento

Disabling customer login & registration on checkout in Magento

July 17, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Disabling customer login & registration on checkout in Magento

Disabling Automatic Customer Registration During Checkout in Magento

As an experienced e-commerce developer at Laravel Company, I understand how important it is to maintain control over the customer registration process during checkout in your Magento store.

Understanding the Issue

When a guest customer completes an order on your Magento site, by default, they are automatically registered as a new user. This means that their account is created, and two emails are sent: one for order confirmation, and another welcoming them to the site with their login credentials.

However, there are scenarios where you might want to disable this automatic registration process. Perhaps you have a membership-based business model, or you simply don’t want customers to be able to log in after purchase. This guide will walk you through how to achieve this using the Magento platform.

Disabling Automatic Customer Registration

To disable automatic customer registration during checkout, we’ll need to modify some core files and configurations. Before proceeding with any changes, I highly recommend creating a backup of your current theme and codebase.

  1. Disable Auto-Login on Checkout

    Open the file app/code/core/Mage/Checkout/controllers/OnepageController.php in your Magento installation (line 486 for version 1.9.x or line 503 for version 2.x).

    You’ll find this code snippet:

    Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);
    

    Comment out these lines with a leading // symbol to stop the auto-login process.

  2. Disable Welcome Email

    The welcome email is sent by the Mage_Core_Model_Observer::checkoutOnepageControllerPostdispatchSaveOrder event observer. To disable it, you need to comment out or delete the following line in:

    app/code/core/Mage/Core/Model/Observer.php

    $emailTemplate->send($customer);
    
  3. Prevent Further Registration

    By default, Magento allows guest checkout even after disabling automatic registration. To prevent further registrations from occurring during this stage:

    • Open the file app/code/core/Mage/Checkout/controllers/OnepageController.php
    • Comment out or remove these lines around line 450:
      if (Mage::getSingleton('customer/session')->isLoggedIn()) {
          $this->_redirect('*/*/');
          return;
      }
      

Conclusion

Disabling automatic customer registration during the checkout process in Magento requires modifying core files and observers. Always remember to make a backup before editing any core files.

At Laravel Company, we provide comprehensive support for e-commerce development, including customizations like this one. If you’re facing difficulties or need further assistance with your Magento store’s configuration, feel free to reach out to our team of experts.

By following the steps outlined above, you should now have successfully disabled the automatic customer registration and welcome email during checkout in your Magento 1.x or 2.x installation.

Magento 1 Checkout Themes Configuration

Our network