当前位置: 首页>>代码示例>>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;未经允许,请勿转载。