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