當前位置: 首頁>>代碼示例>>PHP>>正文


PHP People::Email方法代碼示例

本文整理匯總了PHP中People::Email方法的典型用法代碼示例。如果您正苦於以下問題:PHP People::Email方法的具體用法?PHP People::Email怎麽用?PHP People::Email使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在People的用法示例。


在下文中一共展示了People::Email方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mysqli_connect

require 'model/model.php';
require 'dbConnection.php';
$userID = $match[1];
$conn = mysqli_connect(SERVER_ADDRESS, USER_NAME, PASSWORD, DATABASE);
$user = People::getUser($userID, $conn);
if ($user[0] != 1) {
    mysqli_close($conn);
    header('Content-type: application/json');
    echo json_encode(array("status" => false, "msg" => $user[1]));
    die;
}
$user = $user[1];
$loginInfo = People::getUserLoginInfo($userID, $conn);
if ($loginInfo[0] != 1) {
    mysqli_close($conn);
    header('Content-type: application/json');
    echo json_encode(array("status" => false, "msg" => "Error! Contact Registration Desk Immediately."));
    die;
}
mysqli_close($conn);
$loginInfo = $loginInfo[1];
if (is_null($loginInfo['password'])) {
    header('Content-type: application/json');
    echo json_encode(array("status" => false, "msg" => "Account already verified."));
    die;
}
People::Email($user['email'], $user['name'], $loginInfo['csrfToken'], $userID);
header('Content-type: application/json');
echo json_encode(array("status" => true, "msg" => "Verification link sent to registered email."));
die;
開發者ID:scopeInfinity,項目名稱:anwesha-1,代碼行數:30,代碼來源:resendVerification.php

示例2: sendVerificationMailToAll

 /**
  * In case of Emergency
  * Sends Verification mail to all those who have not confirmed
  * Need in case,after fixing mass bug on mail system 
  * @param  MySQLi $conn       database connection object
  */
 public static function sendVerificationMailToAll($conn)
 {
     $sql = "SELECT * FROM People NATURAL JOIN LoginTable WHERE type > 0 ";
     $result = mysqli_query($conn, $sql);
     if ($result) {
         while ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) {
             $email = $row['email'];
             $name = $row['name'];
             $token = $row['csrfToken'];
             $pid = $row['pId'];
             People::Email($email, $name, $token, $pid, false);
             echo "Email send to " . $email . "\n";
         }
     } else {
         echo "Error in Query Execution";
     }
 }
開發者ID:anweshaiitp,項目名稱:anwesha,代碼行數:23,代碼來源:model.php


注:本文中的People::Email方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。