当前位置: 首页>>代码示例>>PHP>>正文


PHP verifyEmail函数代码示例

本文整理汇总了PHP中verifyEmail函数的典型用法代码示例。如果您正苦于以下问题:PHP verifyEmail函数的具体用法?PHP verifyEmail怎么用?PHP verifyEmail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了verifyEmail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: verifyAll

/**  
 * @see  verifyAll() Verification of First Name
 * @return boolean TRUE == OK, FALSE == empty
 */
function verifyAll()
{
    if (verifyCaptcha() && verifyUsername() && verifyEmail() && verifyFisrtName() && verifyLastName() && verifyPassword1() && verifyPassword2() && verifyTelephoneNumber()) {
        if (verifyCorrespond()) {
            //echo ' Passwords OK <br />';
            //echo '<br />Communication with the database<br />';
            include "PhpmyadminCommunication.php";
        }
        //echo 'Any field are filled <br />';
    }
}
开发者ID:GodCed,项目名称:cloudia_web,代码行数:15,代码来源:verifyaccountScript.php

示例2: elseif

 // not what we expect. You will need an IF block for each element you will
 // check (see above section 1c and 1d). The if blocks should also be in the
 // order that the elements appear on your form so that the error messages
 // will be in the order they appear. errorMsg will be displayed on the form
 // see section 3b. The error flag ($emailERROR) will be used in section 3c.
 if ($firstName == "") {
     $errorMsg[] = "Please enter your first name";
     $firstNameERROR = true;
 } elseif (!verifyAlphaNum($firstName)) {
     $errorMsg[] = "Your first name appears to have extra character.";
     $firstNameERROR = true;
 }
 if ($email == "") {
     $errorMsg[] = "Please enter your email address";
     $emailERROR = true;
 } elseif (!verifyEmail($email)) {
     $errorMsg[] = "Your email address appears to be incorrect.";
     $emailERROR = true;
 }
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 //
 // SECTION: 2d Process Form - Passed Validation
 //
 // Process for when the form passes validation (the errorMsg array is empty)
 //
 if (!$errorMsg) {
     if ($debug) {
         print "<p>Form is valid</p>";
     }
     //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     //
开发者ID:rubberturtle,项目名称:cs148,代码行数:31,代码来源:formbasic.php

示例3: Template

$t = new Template('contact', intval($cgi['t']));

$filter = array(
	'contact-email'  => FILTER_VALIDATE_EMAIL,
	'contact-text'   => FILTER_UNSAFE_RAW,
	'contact-submit' => FILTER_SANITIZE_STRING,
	'e'              => FILTER_VALIDATE_INT
);

$filtered  = filter_input_array(INPUT_POST, $filter);
$filteredG = filter_input_array(INPUT_GET, $filter);

try {
	if ($filtered['contact-submit']) {
		if ($filtered['contact-email'] and verifyEmail($filtered['contact-email'])) {
			$c        = new Contact();
			$c->email = $filtered['contact-email'];
			$c->type  = CONTACT_TYPE_CONTACT_PAGE;
			$c->text  = base64_encode($filtered['contact-text']);
			$c->date  = time();
			$c->done  = 0;
			$id = $c->create();
			
			if (!$id) {
				throw new Exception('Error processing, please submit again');
			}
			else {
				header('Location: contact.php?e=1');
				exit;
			}
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:30,代码来源:contact.php

示例4: max

		$t->nation     = $nation    = max(0, min($filtered['register-nation'], 4));
		$t->rules      = $rules     = $filtered['register-rules'   ];
		$t->referrerId = $filtered['register-referrer'];
		$captcha       = $filtered['register-captcha' ];
		
		$uLength = strlen($username);
		
		if (!User::validateUsername($username)) {
			throw new Exception('Invalid Username');
		}
		
		if ($email != $emailv) {
			throw new Exception('The Email addresses do not match'); 
		}
	
		if (!$email or !verifyEmail($email)) {
			throw new Exception('Invalid Email address');
		}

		if (stripos($email, "ww2game.net") !== false) {
			throw new Exception('Invalid Email address');
		}
	
		if (!$rules) {
			throw new Exception('You must read, and agree to, the Rules and Terms of Service');
		}
		
		if ($captcha != $_SESSION['number']) {
			throw new Exception('You failed to match the captcha to the correct number');
		}
		
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:30,代码来源:register.php

示例5: print_r

<?php

// include SMTP Email Validation Class
require_once 'verify_mail.class.php';
// the email to validate
$email = 'matteo.frassine@beniculturali.it';
// an optional sender
$sender = 'raptor@beniculturali.it';
print_r(verifyEmail($email, $sender, true));
开发者ID:beppenapo,项目名称:rmv,代码行数:9,代码来源:example3.php

示例6: returnAjax

     returnAjax(removeTOTP($_REQUEST));
     break;
 case 'sendtotptext':
     returnAjax(sendTOTPText($_REQUEST));
     break;
 case 'totpstatus':
     returnAjax(hasTOTP($_REQUEST));
     break;
 case 'cansms':
     returnAjax(canSMS($_REQUEST));
     break;
 case 'verifyphone':
     returnAjax(verifyPhone($_REQUEST));
     break;
 case 'verifyemail':
     returnAjax(verifyEmail($_REQUEST));
     break;
 case 'addalternateemail':
     returnAjax(addAlternateEmail($_REQUEST));
     break;
 case 'removeaccount':
     returnAjax(removeAccount($_REQUEST));
     break;
 case 'verifynewuser':
     returnAjax(verifyUserAuth($_REQUEST));
     break;
 case 'startpasswordreset':
     returnAjax(doStartResetPassword($_REQUEST));
     break;
 case 'finishpasswordreset':
     returnAjax(finishResetPassword($_REQUEST));
开发者ID:AmphibiaWeb,项目名称:amphibian-disease-tracker,代码行数:31,代码来源:async_login_handler.php

示例7: verifyText

 if(empty($lastName)){
    $errorMsg[]="Please enter your Last Name";
    $lastNameERROR = true;
 } else {
    $valid = verifyText ($lastName); /* test for non-valid  data */
    if (!$valid){ 
        $errorMsg[]="Last Name must be letters and numbers, spaces, dashes and single quotes only.";
        $lastNameERROR = true;
    }
 }
 
     if(empty($email)){
    $errorMsg[]="Please enter your Email";
    $emailERROR = true;
 } else {
    $valid = verifyEmail ($email); /* test for non-valid  email */
    if (!$valid){ 
        $errorMsg[]="Email must be valid";
        $emailERROR = true;
    }
 }
 
         if(empty($credit)){
    $errorMsg[]="Please enter your credit card";
    $creditERROR = true;
 } else {
    $valid = verifyAlphaNum ($credit); /* test for non-valid  email */
    if (!$valid){ 
        $errorMsg[]="Credit card must be valid";
        $creditERROR = true;
    }
开发者ID:jhegman,项目名称:Portfolio,代码行数:31,代码来源:join.php

示例8: elseif

 // not what we expect. You will need an IF block for each element you will
 // check (see above section 1c and 1d). The if blocks should also be in the
 // order that the elements appear on your form so that the error messages
 // will be in the order they appear. errorMsg will be displayed on the form
 // see section 3b. The error flag ($emailERROR) will be used in section 3c.
 if ($userID == "") {
     $errorMsg[] = "Please enter a User ID";
     $firstNameERROR = true;
 } elseif (!verifyAlphaNum($userID)) {
     $errorMsg[] = "Your User ID appears to contain a non-alphanumerical character.";
     $firstNameERROR = true;
 }
 if ($fldEmail == "") {
     $errorMsg[] = "Please enter your email";
     $emailERROR = true;
 } elseif (!verifyEmail($fldEmail)) {
     $errorMsg[] = "Incorrect email address";
     $emailERROR = true;
 }
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 //
 // SECTION: 2d Process Form - Passed Validation
 //
 // Process for when the form passes validation (the errorMsg array is empty)
 //
 if (!$errorMsg) {
     if ($debug) {
         print "<p>Form is valid</p>";
     }
     //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     //
开发者ID:kohara2794,项目名称:SocialSport,代码行数:31,代码来源:form.php

示例9: json_encode

{
    $query = "select * from algorea_registration where mailValidationHash= ?;";
    $sth = $db->prepare($query);
    $sth->execute(array($hash));
    $res = $sth->fetch();
    if (!$res) {
        echo json_encode(array('success' => false, 'message' => 'Impossible de vérifier l\'email'));
        return;
    }
    if ($res['mailValidated'] == 1) {
        echo json_encode(array('success' => false, 'message' => 'Email déjà vérifié !'));
        return;
    }
    $query = "update algorea_registration set mailValidated = 1 where mailValidationHash = ?;";
    $sth = $db->prepare($query);
    $sth->execute(array($hash));
    echo json_encode(array('success' => true));
}
if ($action === 'getInfos') {
    getInfos($_POST['code'], $db);
} else {
    if ($action === 'registerInfos') {
        registerInfos($_POST['infos'], $db);
    } else {
        if ($action === 'verifyEmail') {
            verifyEmail($_POST['hash'], $db);
        } else {
            echo json_encode(array('success' => false, 'message' => 'Action inconnue'));
        }
    }
}
开发者ID:BebrasTeam,项目名称:BebrasContestServer,代码行数:31,代码来源:register_algorea.php

示例10: optOut

 /**
  * [optOut used to remove the input email from the promo email table]
  * @return [bool] [true if the email was found and removed, false if the email was not found]
  */
 public function optOut()
 {
     # return data
     $data = array();
     # was an email input?
     $email = $this->input->post('email');
     $data['email'] = $email;
     if (verifyEmail($email)) {
         # we received a valid input, try to remove it and return the result to the UI
         $email_removed = $this->store_m->removePromoEmail($email);
         $data['email_removed'] = $email_removed;
     } elseif (!empty($email)) {
         # an invalid email was entered
         $data['invalid'] = true;
     } else {
         # nothing was entered
     }
     $this->renderUI("optout", $data);
 }
开发者ID:suman0359,项目名称:alanmarcero.com-PHP,代码行数:23,代码来源:store.php

示例11: stripslashes

 $email = @$_POST['email'];
 $message = @$_POST['message'];
 // if magic quotes on, remove Magic Quotes effect
 if (get_magic_quotes_gpc()) {
     $name = stripslashes($name);
     $email = stripslashes($email);
     $message = stripslashes($message);
 }
 //Validate user input. Create error array to store errors
 $error_msg = array();
 $valid = verifyAlphaNum($name, 'Write your name here.');
 if (!$valid) {
     $error_msg[] = 'Please provide a valid name.';
     $name_error = '<span class="error">Name must be letters, numbers, spaces, and dashes only.</span>';
 }
 $valid = verifyEmail($email, 'Write your email address');
 if (!$valid) {
     $error_msg[] = 'Please provide a valid email address.';
     $email_error = '<span class="error">Email must be a valid format (e.g. john@yahoo.com).</span>';
 }
 $message = cleanText($message);
 if ($message == 'Write your message here.') {
     $error_msg[] = 'Please provide a valid message.';
     $message_error = "<span class=\"error\">Message can only contain letters, numbers and basic punctuation \" ' - ? ! </span>";
 }
 // if no errors, send email
 if (count($error_msg) === 0) {
     $headers = "MIME-Version: 1.0" . "\r\n";
     $headers .= "Content-type: text/html; charset=utf-8" . "\r\n";
     /* additional headers */
     $headers .= 'From:' . FROM_ADDRESS . "\r\n";
开发者ID:carterggg,项目名称:sk8tarded,代码行数:31,代码来源:validation.php

示例12: displayAccountInformation

                                        <li class="active"><a href="#home" data-toggle="tab">Account Information</a>
                                        </li>
                                        <li><a href="#password" data-toggle="tab">Password</a>
                                        </li>
                                    </ul>

                                    <!-- Tab panes -->
                                    <div class="tab-content">
                                        <div class="tab-pane fade in active" id="home">
                                            <h4>Account Information</h4>
                                            <?php 
include './account_information.php';
if (!isset($_POST["accountInfoSubmit"])) {
    displayAccountInformation($_SESSION["admin_username"], "");
} else {
    if (verifyEmail($_POST["email"])) {
        if (submitAccountInformation($_SESSION["admin_username"], trim($_POST["firstName"]), trim($_POST["lastName"]), trim($_POST["email"]))) {
            $_SESSION['admin_username'] = $_POST["email"];
            displayAccountInformation($_SESSION["admin_username"], "success");
        } else {
            displayAccountInformation($_SESSION["admin_username"], "fail");
        }
    } else {
        displayAccountInformation($_SESSION["admin_username"], "fail_email");
    }
}
?>
                                        </div>    
                                        <div class="tab-pane fade" id="password">
                                            <h4>Password</h4>
                                            <?php 
开发者ID:JoshIT390,项目名称:OnPointPerformance,代码行数:31,代码来源:index.php

示例13: elseif

 // not what we expect. You will need an IF block for each element you will
 // check (see above section 1c and 1d). The if blocks should also be in the
 // order that the elements appear on your form so that the error messages
 // will be in the order they appear. errorMsg will be displayed on the form
 // see section 3b. The error flag ($emailERROR) will be used in section 3c.
 if ($studentNetId == "") {
     $errorMsg[] = "Please enter your net ID";
     $studentNetIdError = true;
 } elseif (!verifyAlphaNum($studentNetId)) {
     $errorMsg[] = "Your net ID appears to have extra character.";
     $studentNetIdError = true;
 }
 if ($studentEmail == "") {
     $errorMsg[] = "Please enter your email address";
     $emailERROR = true;
 } elseif (!verifyEmail($studentEmail)) {
     $errorMsg[] = "Your email address appears to be incorrect.";
     $emailERROR = true;
 }
 if ($advisorNetId == "") {
     $errorMsg[] = "Please enter your advisor's net ID";
     $advisorNetIdError = true;
 } elseif (!verifyAlphaNum($advisorNetId)) {
     $errorMsg[] = "Their net ID appears to have extra character.";
     $advisorNetIdError = true;
 }
 if ($catalogYear == "select") {
     $errorMsg[] = "Please choose the catalog year";
     $catalogYearError = true;
 }
 if ($major == "select") {
开发者ID:skswanke,项目名称:CS148_FINAL,代码行数:31,代码来源:form.php

示例14: header

include "../utils/functions.php";
include "../utils/admin_functions.php";
if (!isset($_SESSION['adminsession'])) {
    header("location: ./login.php");
}
if (isset($_POST['adminsettings'])) {
    if ($_POST['adminuser'] == "") {
        $error = "You did not enter an admin username";
    } else {
        if ($_POST['adminpass'] == "") {
            $error = "You did not enter an admin password";
        } else {
            if ($_POST['adminemail'] == "") {
                $error = "You did not enter an admin email";
            } else {
                if (!verifyEmail($_POST['adminemail'])) {
                    $error = "You did not enter a valid admin email";
                } else {
                    mysql_query("UPDATE `" . $table_prefix . "settings` SET `value` = '" . mysql_real_escape_string($_POST['adminemail']) . "' WHERE `setting` = 'admin_email';");
                    mysql_query("UPDATE `" . $table_prefix . "settings` SET `value` = '" . mysql_real_escape_string($_POST['adminuser']) . "' WHERE `setting` = 'admin_username';");
                    mysql_query("UPDATE `" . $table_prefix . "settings` SET `value` = '" . mysql_real_escape_string($_POST['adminpass']) . "' WHERE `setting` = 'admin_password';");
                    $success = "The admin settings have been successfully updated.";
                }
            }
        }
    }
}
$pagename = "Admin Profile Settings";
include "./admin_header.php";
?>
  <div id="content">
开发者ID:abhinavprince,项目名称:FileEasy-Upload-Script,代码行数:31,代码来源:admin_settings.php

示例15: sha1

require_once '../dirHandler.php';
$f3 = (require $GLOBALS['dirLibs'] . '/external/fatfree/lib/base.php');
require_once $GLOBALS['dirLibs'] . '/external/meekrodb.2.2.class.php';
require_once $GLOBALS['dirCore'] . '/dbConfig.inc.php';
require_once $GLOBALS['dirCore'] . '/config.inc.php';
require_once $GLOBALS['dirCore'] . '/common.inc.php';
#echo $GLOBALS['dirRoot'];
$uid = "";
$email = $_POST['email'];
$rememberMe = $_POST['rememberMe'] == 1;
$emailHash = sha1($email);
$hash = $_POST['hash'];
$account = DB::queryFirstRow("SELECT * FROM CWM_User WHERE Email=%?", $email);
$isNewuser = true;
$isVerified = false;
$isEmailValid = verifyEmail($email);
$isPasswordValid = $hash != sha1("");
$isFirstTime = 1;
if ($isEmailValid && $isPasswordValid) {
    // No user found
    if (is_null($account)) {
        DB::insert('CWM_User', array('Id' => 0, 'Email' => $email, 'EmailHash' => $emailHash, 'Password' => $hash, 'Status' => 0, 'IsFirstTime' => $isFirstTime));
        $uid = DB::insertId();
        $subject = "Welcome to CodeWithMe";
        $message = "\n\t\t<html>\n\t\t<head>\n\t\t  <title>Welcome to CodeWithMe</title>\n\t\t</head>\n\t\t<body>\n\t\t  Thank you for signing up on CodeWithMe!\n\t\t  <br />\n\t\t  Please <a href='http://localhost/CodeWithMe/core/controller/activate.php?id=" . $emailHash . "'>activate your account</a>\n\t\t</body>\n\t\t</html>\n\t\t";
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=utf-8' . '\\r\\n';
        sendEmail($email, $subject, $message, $headers);
    } else {
        $account = DB::queryFirstRow("SELECT * FROM CWM_User WHERE Email=%? AND Password=%?", $email, $hash);
        $uid = $account['Id'];
开发者ID:mahuidong,项目名称:CodeWithMe,代码行数:31,代码来源:login.php


注:本文中的verifyEmail函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。