本文整理汇总了PHP中Customer::checkPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::checkPassword方法的具体用法?PHP Customer::checkPassword怎么用?PHP Customer::checkPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::checkPassword方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isLogged
/**
* Check customer informations saved into cookie and return customer validity
*
* @deprecated as of version 1.5 use Customer::isLogged() instead
* @return boolean customer validity
*/
public function isLogged($withGuest = false)
{
Tools::displayAsDeprecated();
if (!$withGuest && $this->is_guest == 1) {
return false;
}
/* Customer is valid only if it can be load and if cookie password is the same as database one */
if ($this->logged == 1 && $this->id_customer && Validate::isUnsignedId($this->id_customer) && Customer::checkPassword((int) $this->id_customer, $this->passwd)) {
return true;
}
return false;
}
示例2: isLogged
/**
* Check customer informations and return customer validity
*
* @since 1.5.0
* @param boolean $with_guest
* @return boolean customer validity
*/
public function isLogged($with_guest = false)
{
if (!$with_guest && $this->is_guest == 1) {
return false;
}
/* Customer is valid only if it can be load and if object password is the same as database one */
if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) {
return true;
}
return false;
}
示例3: isLogged
/**
* Check customer informations saved into cookie and return customer validity
*
* @return boolean customer validity
*/
function isLogged()
{
/* Customer is valid only if it can be load and if cookie password is the same as database one */
if ($this->logged == 1 and $this->id_customer and Validate::isUnsignedId($this->id_customer) and Customer::checkPassword(intval($this->id_customer), $this->passwd)) {
return true;
}
return false;
}
示例4: isLogged
/**
* Check customer informations saved into cookie and return customer validity
*
* @return boolean customer validity
*/
public function isLogged($withGuest = false)
{
if (!$withGuest and $this->is_guest == 1) {
return false;
}
/* Customer is valid only if it can be load and if cookie password is the same as database one */
if ($this->logged == 1 and $this->id_customer and Validate::isUnsignedId($this->id_customer) and Customer::checkPassword((int) $this->id_customer, $this->passwd)) {
return true;
}
return false;
}
示例5: header
<?php
require_once "util.php";
session_start();
if (isset($_SESSION["username"])) {
header("location: index.php");
}
$message = "";
if (isset($_POST["username"]) && isset($_POST["password"])) {
require_once "DataBase/Customer.php";
$customer = new Customer();
if ($customer->checkPassword(var_post("username", ""), var_post("password", ""))) {
$_SESSION["username"] = var_post("username", "");
header("location: index.php");
} else {
$message = "Anmeldung fehlgeschlagen";
}
}
include "header.php";
?>
<br>
<br>
<form method="post" action="session_login.php" name="login_form">
<div width="100%" align="center">
<?php
if ($message != "") {
print "<div class=\"error\">" . $message . "</div><br>";
}
?>