本文整理汇总了PHP中UserUtil::getUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserUtil::getUser方法的具体用法?PHP UserUtil::getUser怎么用?PHP UserUtil::getUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserUtil
的用法示例。
在下文中一共展示了UserUtil::getUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupForgotPassword
public static function setupForgotPassword($email)
{
$sdb = SDB::getInstance();
$user = UserUtil::getUser($email);
$ufid = SDB::uuid();
$aa = array('uid' => $user['id'], 'createdAt' => date('Y-m-d'));
if (!$sdb->put(self::$DOMAIN_USERS_FORGOT, $ufid, $aa, true)) {
return false;
}
$activationLink = 'http://' . $_SERVER['HTTP_HOST'] . '/home/login/passwordReset?ufid=' . $ufid;
$to = $email;
$subject = 'AdWhirl Password Reset';
$message = 'Hello AdWhirl User,
We received a request to reset your password. Click on the link below to set up a new password for your account.
' . $activationLink . '
If you did not request to reset your password, ignore this email - the link will expire on its own.
Best,
AdWhirl Team
';
mail($to, $subject, $message);
return true;
}
示例2: registerProcessed
public function registerProcessed()
{
$email = strtolower($_POST['email']);
$password = $_POST['password'];
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$allowEmail = isset($_POST['allowEmail']) ? 1 : 0;
$result = UserUtil::registerNewUser($email, $firstName, $lastName, $password, $allowEmail);
$u = UserUtil::getUser($email);
return $this->smarty->fetch('../tpl/www/home/registerProcessed.tpl');
}
示例3: checkPassword
public function checkPassword()
{
$this->printHeader = false;
$this->printFooter = false;
$email = $_POST['email'];
$password = $_POST['password'];
$user = UserUtil::getUser($email, $password);
if ($user != null) {
return 'true';
} else {
return 'false';
}
}