if(!$customerConfirmed){ // Reset login information if Double-Opt-In is active
$customer->setFirstLogin(null); $customer->setLastLogin(null); $customer->setDoubleOptinEmailSentDate(newDateTime()); }
$sql = "DELETE FROM `s_core_optin` WHERE `hash` = ? AND type = 'swRegister'"; $connection->executeQuery($sql, [$this->Request()->get('sConfirmation')]);
// Set parameter to the customer model.
$customer->fromArray($params);
// If user will be activated, but the first login is still 0, because he was in doi-process
if($customer->getActive()&&(!$customer->getFirstLogin() || $customer->getFirstLogin()->getTimestamp() === 0)){ $customer->setFirstLogin(newDateTime()); }