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


PHP People::getUser方法代碼示例

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


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

示例1: sendEventRegistrationEmail

 public function sendEventRegistrationEmail($userID, $eveID, $conn)
 {
     $user = People::getUser($userID, $conn);
     $sql = "SELECT eveName FROM Events WHERE eveId = {$eveID}";
     $result = mysqli_query($conn, $sql);
     $row = mysqli_fetch_assoc($result);
     $eveName = $row['eveName'];
     $name = $user[1]['name'];
     $emailId = $user[1]['email'];
     // mail($to,$subject,$message);
     $message = "Hi {$name},<br>You have been registered for event<b> {$eveName}.</b> Thank You! <br>In case you have any registration related queries feel free to contact Aditya Gupta(+918292337923) or Arindam Banerjee(+919472472543) or drop an email to <i>registration@anwesha.info</i>. You can also visit our website <i>http://2016.anwesha.info/</i> for more information.<br><br>Registration Desk<br>Anwesha 2k16";
     $subject = "{$eveName} Registration Anwesha2k16";
     require 'resources/PHPMailer/PHPMailerAutoload.php';
     $mail = new PHPMailer();
     $mail->SMTPDebug = 0;
     $mail->isSMTP();
     // Set mailer to use SMTP
     $mail->Host = 'lnx36.securehostdns.com';
     // Specify main and backup SMTP servers
     $mail->SMTPAuth = true;
     // Enable SMTP authentication
     $mail->Username = 'registration@anwesha.info';
     // SMTP username
     $mail->Password = 'anw_reg_2015_codered';
     // SMTP password
     $mail->SMTPSecure = 'ssl';
     // Enable TLS encryption, `ssl` also accepted
     $mail->Port = 465;
     // TCP port to connect to
     $mail->setFrom('registration@anwesha.info', 'Anwesha Registration & Planning Team');
     $mail->addAddress($emailId, $name);
     // Add a recipient
     // $mail->addAddress('ellen@example.com');               // Name is optional
     $mail->addReplyTo('registration@anwesha.info', 'Registration & Planning Team');
     // $mail->addCC('guptaaditya.13@gmail.com');
     // $mail->addBCC('registration@anwesha.info');
     // $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
     // $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
     $mail->isHTML(true);
     // Set email format to HTML
     $mail->Subject = $subject;
     $mail->Body = $message;
     $mail->AltBody = "Hi {$name},\nYou have been registered for event {$eveName}. Thank You!\nIn case you have any registration related queries feel free to contact Aditya Gupta(+918292337923) or Arindam Banerjee(+919472472543) or drop an email to registration@anwesha.info. You can also visit our website http://2016.anwesha.info/ for more information.\nRegistration Desk\nAnwesha 2k16";
     $mail->send();
 }
開發者ID:scopeInfinity,項目名稱:anwesha-1,代碼行數:45,代碼來源:model.php

示例2: mysqli_connect

<?php

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."));
開發者ID:scopeInfinity,項目名稱:anwesha-1,代碼行數:31,代碼來源:resendVerification.php

示例3: sendEventRegistrationEmail

 public function sendEventRegistrationEmail($userID, $eveID, $conn)
 {
     require 'defines.php';
     $user = People::getUser($userID, $conn);
     $sql = "SELECT eveName FROM Events WHERE eveId = {$eveID}";
     $result = mysqli_query($conn, $sql);
     $row = mysqli_fetch_assoc($result);
     $eveName = $row['eveName'];
     $name = $user[1]['name'];
     $emailId = $user[1]['email'];
     // mail($to,$subject,$message);
     $message = "Hi {$name},<br>You have been registered for event<b> {$eveName}.</b> Thank You! <br>In case you have any registration related queries feel free to contact {$ANWESHA_REG_CONTACT} or drop an email to <i>{$ANWESHA_YEAR}</i>. You can also visit our website <i>{$ANWESHA_URL}</i> for more information.<br><br>Registration Desk<br>{$ANWESHA_YEAR}";
     $subject = "{$eveName} Registration {$ANWESHA_YEAR}";
     require 'resources/PHPMailer/PHPMailerAutoload.php';
     require 'emailCredential.php';
     $mail = new PHPMailer();
     $mail->SMTPDebug = 0;
     $mail->isSMTP();
     // Set mailer to use SMTP
     $mail->Host = MAIL_HOST;
     // Specify main and backup SMTP servers
     $mail->SMTPAuth = MAIL_SMTP_AUTH;
     // Enable SMTP authentication
     $mail->Username = MAIL_USERNAME;
     // SMTP username
     $mail->Password = MAIL_PASSWORD;
     // SMTP password
     $mail->SMTPSecure = MAIL_SMTP_SECURE;
     // Enable TLS encryption, `ssl` also accepted
     $mail->Port = MAIL_PORT;
     // TCP port to connect to
     $mail->setFrom($ANWESHA_YEAR, 'Anwesha Registration & Planning Team');
     $mail->addAddress($emailId, $name);
     // Add a recipient
     // $mail->addAddress('ellen@example.com');               // Name is optional
     $mail->addReplyTo($ANWESHA_YEAR, 'Registration & Planning Team');
     // $mail->addCC('guptaaditya.13@gmail.com');
     // $mail->addBCC($ANWESHA_YEAR);
     // $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
     // $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
     $mail->isHTML(true);
     // Set email format to HTML
     $mail->Subject = $subject;
     $mail->Body = $message;
     $mail->AltBody = "Hi {$name},\nYou have been registered for event {$eveName}. Thank You!\nIn case you have any registration related queries feel free to contact {$ANWESHA_REG_CONTACT} or drop an email to {$ANWESHA_YEAR}. You can also visit our website http://2017.anwesha.info/ for more information.\nRegistration Desk\nAnwesha 2k17";
     $mail->send();
 }
開發者ID:anweshaiitp,項目名稱:anwesha,代碼行數:47,代碼來源:model.php


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