var fixes = {"gmial.com":"gmail.com","gmal.com":"gmail.com","hotmial.com":"hotmail.com","outlok.com":"outlook.com","yaho.com":"yahoo.com"};
jQuery('#email_field').on('blur', function () {
var v = this.value.trim(), d = v.split('@')[1];
if (d && fixes[d.toLowerCase()]) {
if (confirm('Did you mean ' + v.split('@')[0] + '@' + fixes[d.toLowerCase()] + '?')) {
this.value = v.split('@')[0] + '@' + fixes[d.toLowerCase()];
}
}
});
// plugins/system/emailcheck/emailcheck.php (simplified)
public function plgVmOnUserStore(&$data)
{
$email = isset($data['email']) ? trim($data['email']) : '';
if ($email === '') return true;
$http = Joomla\CMS\Http\HttpFactory::getHttp();
try {
$res = $http->get('https://YOUR-VERIFIER/verify?email=' . urlencode($email),
['Authorization' => 'Bearer ' . $this->params->get('api_key')], 3);
$status = json_decode($res->body)->status ?? 'unknown';
} catch (Exception $e) {
return true; // fail open, never block a sale because the API is slow
}
if (in_array($status, ['invalid', 'disposable'])) {
vmError('Please enter a valid, permanent email address.');
return false;
}
return true;
}
foreach ($newArray as $sKeyInd => &$newValue) {$newValue['id'] = $oldArray[$sKeyInd]['id'];unset($newValue);store($updateNulls = false) code in vmtablexarray.php calculated each image's order number but never wrote it to the database. It assigned the number to a copy of the row (foreach (... as $k => $newValue)), so the original row never got it. Every row was stored without an order number.
Page created in 0.053 seconds with 9 queries.