本文整理汇总了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();
}
示例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."));
示例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();
}