bebeboutik/override/controllers/IdentityController.php

31 lines
820 B
PHP
Raw Normal View History

2016-01-04 12:48:08 +01:00
<?php
2018-02-09 09:30:13 +01:00
class IdentityController extends IdentityControllerCore
{
public function preProcess()
{
2016-01-04 12:48:08 +01:00
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');
}
}
}
}
2016-01-04 12:48:08 +01:00
parent::preProcess();
}
2018-02-09 09:30:13 +01:00
public function setMedia()
{
2016-01-04 12:48:08 +01:00
parent::setMedia();
global $css_files;
$css_files = array_slice($css_files, 0, 1);
}
}