bebeboutik/override/controllers/IdentityController.php

31 lines
820 B
PHP
Executable File

<?php
class IdentityController extends IdentityControllerCore
{
public function preProcess()
{
self::$smarty->assign(array('HOOK_PROFILE_EDIT' => Module::hookExec('profileEdit')));
if (Tools::isSubmit('submitIdentity')) {
$customer = new Customer((int)(self::$cookie->id_customer));
if (isset($_POST['email'])) {
$_POST['email'] = strtolower(trim($_POST['email']));
if ($_POST['email'] != $customer->email) {
if (Customer::customerExists($_POST['email'])) {
$this->errors[] = Tools::displayError('An account is already registered with this e-mail');
}
}
}
}
parent::preProcess();
}
public function setMedia()
{
parent::setMedia();
global $css_files;
$css_files = array_slice($css_files, 0, 1);
}
}