// 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()); }