当前位置: 首页>>代码示例>>PHP>>正文


PHP Employee::checkPassword方法代码示例

本文整理汇总了PHP中Employee::checkPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::checkPassword方法的具体用法?PHP Employee::checkPassword怎么用?PHP Employee::checkPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Employee的用法示例。


在下文中一共展示了Employee::checkPassword方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isLoggedBack

 /**
  * Check employee informations saved into cookie and return employee validity
  *
  * @return bool employee validity
  */
 public function isLoggedBack()
 {
     if (!Cache::isStored('isLoggedBack' . $this->id)) {
         /* Employee is valid only if it can be load and if cookie password is the same as database one */
         $result = $this->id && Validate::isUnsignedId($this->id) && Employee::checkPassword($this->id, Context::getContext()->cookie->passwd) && (!isset(Context::getContext()->cookie->remote_addr) || Context::getContext()->cookie->remote_addr == ip2long(Tools::getRemoteAddr()) || !Configuration::get('PS_COOKIE_CHECKIP'));
         Cache::store('isLoggedBack' . $this->id, $result);
         return $result;
     }
     return Cache::retrieve('isLoggedBack' . $this->id);
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:15,代码来源:Employee.php

示例2: isLoggedBack

 /**
  * Check employee informations saved into cookie and return employee validity
  *
  * @deprecated as of version 1.5 use Employee::isLoggedBack() instead
  * @return boolean employee validity
  */
 public function isLoggedBack()
 {
     Tools::displayAsDeprecated();
     /* Employee is valid only if it can be load and if cookie password is the same as database one */
     return $this->id_employee && Validate::isUnsignedId($this->id_employee) && Employee::checkPassword((int) $this->id_employee, $this->passwd) && (!isset($this->_content['remote_addr']) || $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()) || !Configuration::get('PS_COOKIE_CHECKIP'));
 }
开发者ID:WhisperingTree,项目名称:etagerca,代码行数:12,代码来源:Cookie.php

示例3: checkEnvironment

 protected function checkEnvironment()
 {
     $cookie = new Cookie('psAdmin', '', (int) Configuration::get('PS_COOKIE_LIFETIME_BO'));
     return isset($cookie->id_employee) && isset($cookie->passwd) && Employee::checkPassword($cookie->id_employee, $cookie->passwd);
 }
开发者ID:AlexEven,项目名称:themeconfigurator,代码行数:5,代码来源:themeconfigurator.php

示例4: isLoggedBack

 /**
  * Check employee informations saved into cookie and return employee validity
  *
  * @return boolean employee validity
  */
 public function isLoggedBack()
 {
     /* Employee is valid only if it can be load and if cookie password is the same as database one */
     return $this->id && Validate::isUnsignedId($this->id) && Employee::checkPassword($this->id, $this->passwd) && (!isset($this->remote_addr) || $this->remote_addr == ip2long(Tools::getRemoteAddr()) || !Configuration::get('PS_COOKIE_CHECKIP'));
 }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:10,代码来源:Employee.php

示例5: dirname

<?php

include_once dirname(__FILE__) . "/../../config/config.php";
//init内需要完成后台验证,判断后台登录的用户类型给予用户相关权限.
if (!$cookie->__isset('ad_id_employee') || !$cookie->__isset('ad_passwd')) {
    header('Location: login.php?logout');
} elseif (!Employee::checkPassword($cookie->ad_id_employee, $cookie->ad_passwd)) {
    header('Location: login.php?logout');
}
//$admin_path = trim(str_replace(_TM_ROOT_DIR_,'',_TM_ADMIN_DIR_),'\\');
//define('_TM_ADMIN_URL',_TM_ROOT_URL_.$admin_path.'/');
开发者ID:yiuked,项目名称:tmcart,代码行数:11,代码来源:init.php

示例6: isLoggedBack

 /**
  * Check employee informations saved into cookie and return employee validity
  *
  * @return boolean employee validity
  */
 function isLoggedBack()
 {
     /* Employee is valid only if it can be load and if cookie password is the same as database one */
     if ($this->id_employee and Validate::isUnsignedId($this->id_employee) and Employee::checkPassword(intval($this->id_employee), $this->passwd)) {
         return true;
     }
     return false;
 }
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:13,代码来源:Cookie.php

示例7: dirname

/**
 * 2015 Mediafinanz
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to info@easymarketing.de so we can send you a copy immediately.
 *
 * @author    silbersaiten www.silbersaiten.de <info@silbersaiten.de>
 * @copyright 2015 Mediafinanz
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 */
require_once dirname(__FILE__) . '/../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../init.php';
require_once _PS_MODULE_DIR_ . 'mediafinanz/classes/MediafinanzNewMessage.php';
if (Employee::checkPassword(Tools::getValue('iem'), Tools::getValue('iemp'))) {
    $context = Context::getContext();
    $context->employee = new Employee(Tools::getValue('iem'));
    $context->cookie->passwd = Tools::getValue('iemp');
    if (Tools::isSubmit('updateNewMessages')) {
        die(MediafinanzNewMessage::updateNewMessages());
    }
} else {
    die(Tools::displayError('Please log in first'));
}
开发者ID:jBangiev,项目名称:mediafinanz,代码行数:30,代码来源:ajax.php

示例8: isLoggedBack

 /**
  * Check employee informations saved into cookie and return employee validity
  *
  * @return boolean employee validity
  */
 function isLoggedBack()
 {
     /* Employee is valid only if it can be load and if cookie password is the same as database one */
     if ($this->id_employee and Validate::isUnsignedId($this->id_employee) and Employee::checkPassword(intval($this->id_employee), $this->passwd) and (!isset($this->_content['remote_addr']) or $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()))) {
         return true;
     }
     return false;
 }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:13,代码来源:Cookie.php


注:本文中的Employee::checkPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。