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


PHP Mage_Core_Model_Abstract::getUserId方法代码示例

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


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

示例1: roleUserExists

 /**
  * Check if role user exists
  *
  * @param Mage_Core_Model_Abstract $user
  * @return array|false
  */
 public function roleUserExists(Mage_Core_Model_Abstract $user)
 {
     if ($user->getUserId() > 0) {
         $roleTable = $this->getTable('admin/role');
         $dbh = $this->_getReadAdapter();
         $binds = array('parent_id' => $user->getRoleId(), 'user_id' => $user->getUserId());
         $select = $dbh->select()->from($roleTable)->where('parent_id = :parent_id')->where('user_id = :user_id');
         return $dbh->fetchCol($select, $binds);
     } else {
         return array();
     }
 }
开发者ID:lynxtdc,项目名称:aromaworks,代码行数:18,代码来源:User.php

示例2: roleUserExists

 /**
  * Retrieve roles which exists for user
  *
  * @param Mage_Core_Model_Abstract $user
  * @return array
  */
 public function roleUserExists(Mage_Core_Model_Abstract $user)
 {
     $result = array();
     if ($user->getUserId() > 0) {
         $adapter = $this->_getReadAdapter();
         $select = $adapter->select()->from($this->getTable('api/role'))->where('parent_id = ?', $user->getRoleId())->where('user_id = ?', $user->getUserId());
         $result = $adapter->fetchCol($select);
     }
     return $result;
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:16,代码来源:User.php

示例3: roleUserExists

 public function roleUserExists(Mage_Core_Model_Abstract $user)
 {
     if ($user->getUserId() > 0) {
         $roleTable = $this->getTable('api/role');
         $dbh = $this->_getReadAdapter();
         $select = $dbh->select()->from($roleTable)->where("parent_id = {$user->getRoleId()} AND user_id = {$user->getUserId()}");
         return $dbh->fetchCol($select);
     } else {
         return array();
     }
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:11,代码来源:User.php

示例4: hasAssigned2Role

 public function hasAssigned2Role(Mage_Core_Model_Abstract $user)
 {
     if ($user->getId() > 0) {
         $dbh = $this->_getReadAdapter();
         $select = $dbh->select();
         $select->from($this->getTable('admin/role'))->where("parent_id > 0 AND user_id = {$user->getUserId()}");
         return $dbh->fetchAll($select);
     } else {
         return null;
     }
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:11,代码来源:User.php


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