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