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


PHP Model_User::getUserByEmail方法代码示例

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


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

示例1: editAction

 /**
  * 用户修改
  */
 public function editAction()
 {
     if ($this->_request->isPost()) {
         $aUser = $this->_checkData('update');
         if (empty($aUser)) {
             return null;
         }
         $aUser['iUserID'] = intval($this->getParam('iUserID'));
         $aOldUser = Model_User::getDetail($aUser['iUserID']);
         if (empty($aOldUser)) {
             return $this->showMsg('用户不存在!', false);
         }
         if ($aOldUser['sEmail'] != $aUser['sEmail'] && $aOldUser['iStatus'] > 0) {
             if (Model_User::getUserByEmail($aUser['sEmail'])) {
                 return $this->showMsg('用户已经存在!', false);
             }
         }
         if (1 == Model_User::updData($aUser)) {
             //判断余额是否变化
             if (intval($aOldUser['iMoney']) != intval($aUser['iMoney'])) {
                 //邮件
                 $sTitle = Model_Kv::getValue('user_credit_email_title');
                 $sContent = Model_Kv::getValue('user_credit_email_content');
                 $sTitler = Model_Kv::getValue('user_crediter_email_title');
                 $sContentr = Model_Kv::getValue('user_crediter_email_content');
                 $email = 'viven@51wom.com';
                 $Money = intval($aUser['iMoney']) - intval($aOldUser['iMoney']);
                 Util_Mail::send($aUser['sEmail'], $sTitle, $sContent, array($Money));
                 Util_Mail::send($email, $sTitler, $sContentr, array($aUser['sEmail'], $Money));
             }
             //判断利率是否变化
             if ($aOldUser['iRate'] != $aUser['iRate']) {
                 Model_Media::query("UPDATE  t_media  SET  iRate= {$aUser['iRate']} WHERE iUserID={$aUser['iUserID']}");
             }
             return $this->showMsg('用户信息更新成功!', true);
         } else {
             return $this->showMsg('用户信息更新失败!', false);
         }
     } else {
         $iUserID = intval($this->getParam('id'));
         $aUser = Model_User::getDetail($iUserID);
         $this->assign('aUser', $aUser);
         $this->assign('aBusiness', Model_Domain::getPairDomain(Model_Domain::TYPE_CO_INDUSTRY));
         //行业
     }
 }
开发者ID:pancke,项目名称:yyaf,代码行数:49,代码来源:Member.php

示例2: editAction

 /**
  * 用户修改
  */
 public function editAction()
 {
     if ($this->_request->isPost()) {
         $aUser = $this->_checkData('update');
         if (empty($aUser)) {
             return null;
         }
         $aUser['iUserID'] = intval($this->getParam('iUserID'));
         $aOldUser = Model_User::getDetail($aUser['iUserID']);
         if (empty($aOldUser)) {
             return $this->showMsg('用户不存在!', false);
         }
         if ($aOldUser['sEmail'] != $aUser['sEmail'] && $aOldUser['iStatus'] > 0) {
             if (Model_User::getUserByEmail($aUser['sEmail'])) {
                 return $this->showMsg('用户已经存在!', false);
             }
         }
         if (1 == Model_User::updData($aUser)) {
             return $this->showMsg('用户信息更新成功!', true);
         } else {
             return $this->showMsg('用户信息更新失败!', false);
         }
     } else {
         $iUserID = intval($this->getParam('id'));
         $aUser = Model_User::getDetail($iUserID);
         $this->assign('aUser', $aUser);
         $this->assign('aBusiness', Model_Domain::getPairDomain(Model_Domain::TYPE_CO_INDUSTRY));
         //行业
     }
 }
开发者ID:pancke,项目名称:yyaf,代码行数:33,代码来源:Credit.php

示例3: userinfoAction

 /**
  * 个人信息
  */
 public function userinfoAction()
 {
     if ($this->isPost()) {
         $aParam = $this->getParams();
         $aParam['iUserID'] = $this->aCurrUser['iUserID'];
         $aUser = Model_User::getDetail($aParam['iUserID']);
         $aErr = array();
         //             if (empty($aParam['sEmail']) || ! Util_Validate::isEmail($aParam['sEmail'])) {
         //                 $aErr['sEmail'] = '邮箱格式不正确';
         //             }
         if (empty($aParam['sMobile']) || !Util_Validate::isMobile($aParam['sMobile'])) {
             $aErr['sMobile'] = '手机号码格式不正确';
         }
         if ($aUser['sEmail'] != $aParam['sEmail'] && Model_User::getUserByEmail($aParam['sEmail'], $aParam['iType'], $aParam['iUserID'])) {
             $aErr['sEmail'] = '该邮箱已经被注册了';
         }
         if ($aUser['sMobile'] != $aParam['sMobile'] && Model_User::getUserByMobile($aParam['sMobile'], $aParam['iType'], $aParam['iUserID'])) {
             $aErr['sMobile'] = '该手机号码已经被注册了';
         }
         if (!Util_Validate::isCLength($aParam['sRealName'], 2, 5)) {
             $aErr['sRealName'] = '姓名长度为2-5个汉字!';
         }
         if (!Util_Validate::isLength($aParam['sWeixin'], 4, 50)) {
             $aErr['sWeixin'] = '请输入正确的微信号';
         }
         if (!Util_Validate::isQQ($aParam['sQQ'])) {
             $aErr['sQQ'] = 'QQ号码输入不正确';
         }
         if (!empty($aErr)) {
             return $this->showMsg($aErr, false);
         }
         Model_User::updData($aParam);
         return $this->showMsg('个人信息修改成功!', true);
     } else {
         $aUser = Model_user::getDetail($this->aCurrUser['iUserID']);
         $this->assign('aUser', $aUser);
         $this->assign('iTabID', 2);
         $this->setMeta('mcenter_page', array('sTitle' => '自媒体中心 - 个人资料'));
     }
 }
开发者ID:pancke,项目名称:yyaf,代码行数:43,代码来源:Mcenter.php

示例4: loginAction

 /**
  * 用户登录
  */
 public function loginAction()
 {
     if ($this->isPost()) {
         $iType = $this->getParam('type');
         $sUser = $this->getParam('user');
         $sPass = $this->getParam('pass');
         $sCode = $this->getParam('code');
         $aErr = array();
         if (!Util_Verify::checkImageCode($iType, $sCode)) {
             $aErr['code'] = '验证码错误';
         }
         if (empty($sUser)) {
             $aErr['user'] = '请输入登录邮箱';
         } else {
             $aUser = Model_User::getUserByEmail($sUser, $iType);
             if (empty($aUser)) {
                 $aErr['user'] = '该邮箱尚未注册';
             } elseif (Model_User::makePassword($sPass) != $aUser['sPassword']) {
                 $aErr['pass'] = '登录密码错误';
             }
         }
         if (!empty($aErr)) {
             return $this->showMsg($aErr, false);
         }
         $aCookie = Model_User::login($aUser);
         return $this->showMsg($aCookie, true);
     } else {
         $this->assign('iType', max(1, intval($this->getParam('type'))));
         $this->assign('retUrl', $this->getParam('ret'));
         $this->setMeta('user_login', array('sTitle' => '用户登录'));
     }
 }
开发者ID:pancke,项目名称:yyaf,代码行数:35,代码来源:User.php


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