isLogged()) { Tools::redirect(); } } public function displayContent() { parent::displayContent(); global $cookie; if($cookie->isLogged()) { $sponsor = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'invite` WHERE `id_customer` = '.(int) $cookie->id_customer ); if(count($sponsor) > 0) { $s = new Customer($sponsor[0]['id_sponsor']); self::$smarty->assign(array('email_sponsor' => $s->email)); } self::$smarty->assign(array( 'email_customer' => $cookie->email, 'id_customer' => (int) $cookie->id_customer, 'HOOK_ACCOUNT_VALIDATION' => Module::hookExec('accountValidation', array('sponsor' => $s)), )); self::$smarty->display(_PS_THEME_DIR_.'validation.tpl'); } else { Tools::redirect(); } } }