Jump to content

Controllo Su Indirizzo Email


Recommended Posts

Salve

 

con ps 1.6.1.4 ho la necessita di inserire manualmente clienti con lo stesso indirizzo email .

 

Questo non è possibile in quanto il controllo sul indirizzo email restituisce un errore ":Esiste già un account con questo indirizzo email. Cambia password o richiedine una nuova."

 

vi chiedo come posso eliminare questo tipo di controllo ? ho provato a lavorare sia su authentication.tlp che classes--> costumer.php senza risultati

 

garzie

Edited by la mamma (see edit history)
Link to comment
Share on other sites

ma se modifico il file costumer.php 

 

 

da

 

/**
     * Check if e-mail is already registered in database
     *
     * @param string $email e-mail
     * @param $return_id boolean
     * @param $ignore_guest boolean, to exclude guest customer
     * @return Customer ID if found, false otherwise
     */
    public static function customerExists($email, $return_id = false, $ignore_guest = true)
    {
        if (!Validate::isEmail($email)) {
            if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) {
                die(Tools::displayError('Invalid email'));
            }
            return false;
        }

        $result = Db::getInstance()->getValue('
        SELECT `id_customer`
        FROM `'._DB_PREFIX_.'customer`
        WHERE `email` = \''.pSQL($email).'\'
        '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
        '.($ignore_guest ? ' AND `is_guest` = 0' : ''));
       

return ($return_id ? (int)$result : (bool)$result);
    }
 

 

 

a

 

/**
     * Check if e-mail is already registered in database
     *
     * @param string $email e-mail
     * @param $return_id boolean
     * @param $ignore_guest boolean, to exclude guest customer
     * @return Customer ID if found, false otherwise
     */
    public static function customerExists($email, $return_id = false, $ignore_guest = true)
    {
        if (!Validate::isEmail($email)) {
            if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) {
                die(Tools::displayError('Invalid email'));
            }
            return false;
        }

        $result = Db::getInstance()->getValue('
        SELECT `id_customer`
        FROM `'._DB_PREFIX_.'customer`
        WHERE `email` = \''.pSQL($email).'\'
        '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
        '.($ignore_guest ? ' AND `is_guest` = 0' : ''));
       

          return false;
    }

 

 

posso avere preoblemi ?

Link to comment
Share on other sites

Ciao,

io sono un principiante, però sono riuscito a rendere il campo mail non obbligatorio modificando il DB e impostando nella tabella *_customer il campo NULL della riga email sul valore SI.

Inoltre ho importato i clienti con un file CSV impostando nel file tutte le mail uguali. Ovviamente l clienti non avranno accesso al front, ma a me serve gestire il tutto con un account che uso come Agente e imposta (scomodamnete )gli ordini dal back office.

 

Grazie

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...