valid_email() public method

Email Validation
public valid_email ( $email ) : boolean
return boolean
Esempio n. 1
0
 * modules. Package maintainers should set AMPEXTERNPACKAGES to true in /etc/amportal.conf.
 * Optionally, the other way is to remove the below lines, and instead just define
 * EXTERNAL_PACKAGE_MANAGEMENT as 1. This prevents changing the setting from amportal.conf.
 */
if (!isset($amp_conf['AMPEXTERNPACKAGES']) || $amp_conf['AMPEXTERNPACKAGES'] != 'true') {
    define('EXTERNAL_PACKAGE_MANAGEMENT', 0);
} else {
    define('EXTERNAL_PACKAGE_MANAGEMENT', 1);
}
$modulef = module_functions::create();
// Handle the ajax post back of an update online updates email array and status
//
if ($quietmode && isset($_REQUEST['update_email'])) {
    $update_email = $_REQUEST['update_email'];
    $ci = new CI_Email();
    if (!$ci->valid_email($update_email) && $update_email) {
        $json_array['status'] = _("Invalid email address") . ' : ' . $update_email;
    } else {
        $cm = cronmanager::create($db);
        $cm->save_email($update_email);
        $cm->set_machineid($_REQUEST['machine_id']);
        $json_array['status'] = true;
    }
    header("Content-type: application/json");
    echo json_encode($json_array);
    exit;
}
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
global $active_repos;
$loc_domain = 'amp';
if (isset($_REQUEST['check_online'])) {