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


PHP EnmasseHelper::getUserByName方法代码示例

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


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

示例1: deleteList

 function deleteList($cids)
 {
     $row = $this->getTable();
     $nGroup = JModel::getInstance('setting', 'EnmasseModel')->getSetting(1)->merchant_group;
     foreach ($cids as $cid) {
         $row->load($cid);
         if (!$row->delete()) {
             $this->setError($row->getErrorMsg());
             return false;
         }
         //remove merchant group for this user from joomla user group table
         $jUserId = EnmasseHelper::getUserByName($row->user_name)->id;
         $user = new JUser($jUserId);
         $user->groups = array_diff($user->groups, array($nGroup));
         $user->save();
     }
     return true;
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:18,代码来源:merchant.php

示例2: checkUserName

 public function checkUserName()
 {
     $userName = JRequest::getVar("userName");
     $nMerId = JRequest::getVar("mer_id", null);
     $user = EnmasseHelper::getUserByName($userName);
     $merchant = JModel::getInstance('merchant', 'enmasseModel')->checkUserNameDup($userName, $nMerId);
     if (!empty($user)) {
         if (!empty($merchant)) {
             echo 'duplicated';
         } else {
             echo 'valid';
         }
     } else {
         echo 'invalid';
     }
     exit(0);
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:17,代码来源:salesPerson.php

示例3: store

 /**
  * 
  * Store merchant data into the DB 
  * @param array $data
  * @return boolean true on success
  */
 public function store($data)
 {
     $oRow = JTable::getInstance('merchant', 'Table');
     if (!$oRow->bind($data)) {
         $this->setError($oRow->getError());
         return false;
     }
     if (empty($oRow->id)) {
         $oRow->created_at = DatetimeWrapper::getDatetimeOfNow();
     }
     $oRow->updated_at = DatetimeWrapper::getDatetimeOfNow();
     if (!$oRow->check()) {
         $this->setError($oRow->getError());
         return false;
     }
     if (!$oRow->store()) {
         $this->setError($oRow->getError());
         return false;
     }
     //set group for the merchant person
     $jUserId = EnmasseHelper::getUserByName($data['user_name'])->id;
     $nGroup = JModel::getInstance('setting', 'EnmasseModel')->getSetting(1)->merchant_group;
     $user = new JUser($jUserId);
     $user->groups = array_merge($user->groups, array($nGroup));
     $user->save();
     return true;
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:33,代码来源:merchant.php

示例4: checkUserName

 function checkUserName()
 {
     $userName = JRequest::getVar("userName");
     $user = EnmasseHelper::getUserByName($userName);
     $userByUserName = JModel::getInstance('salesperson', 'enmasseModel')->getSaleByUserName($userName);
     if (!empty($user)) {
         if (!empty($userByUserName)) {
             echo 'duplicated';
         } else {
             echo 'valid';
         }
     } else {
         echo 'invalid';
     }
     exit(0);
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:16,代码来源:salesPerson.php


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