本文整理汇总了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 />';
}
}
示例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>";
}
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//
示例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;
}
示例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');
}
示例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));
示例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));
示例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;
}
示例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>";
}
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//
示例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'));
}
}
}
示例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);
}
示例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";
示例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
示例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") {
示例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">
示例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'];