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


PHP Customer::checkPassword方法代碼示例

本文整理匯總了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;
 }
開發者ID:WhisperingTree,項目名稱:etagerca,代碼行數:18,代碼來源:Cookie.php

示例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;
 }
開發者ID:dev-lav,項目名稱:htdocs,代碼行數:18,代碼來源:Customer.php

示例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;
 }
開發者ID:Bruno-2M,項目名稱:prestashop,代碼行數:13,代碼來源:Cookie.php

示例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;
 }
開發者ID:nicolasjeol,項目名稱:hec-ecommerce,代碼行數:16,代碼來源:Cookie.php

示例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>";
}
?>
開發者ID:nebulade,項目名稱:faursprung_website,代碼行數:31,代碼來源:session_login.php


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