perchè di php non sono praticae sto andando per tentativi
comunque ho fatto delle prove e ho visto che su questa function non è possibile perchè è una function generica che vale per più tabelle e li campi da aggiornare sono nella tabella customer ...
che dici la function sotto è possibile modificarla per fargli fare quello che voglio fare io ?
public function getByEmail($email, $passwd = null, $ignore_guest = true)
{
if (!Validate::isEmail($email) || ($passwd && !Validate::isPasswd($passwd))) {
die(Tools::displayError());
}
$result = Db::getInstance()->getRow('
SELECT *
FROM `'._DB_PREFIX_.'customer`
WHERE `email` = \''.pSQL($email).'\' or `email2` = \''.pSQL($email).'\'
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
'.(isset($passwd) ? 'AND `passwd` = \''.pSQL(Tools::encrypt($passwd)).'\'' : '').'
AND `deleted` = 0
'.($ignore_guest ? ' AND `is_guest` = 0' : ''));
if (!$result) {
return false;
}
$this->id = $result['id_customer'];
foreach ($result as $key => $value) {
if (property_exists($this, $key)) {
$this->{$key} = $value;
}
}
return $this;
}