コード例 #1
0
 /**
  * 更新消息数
  *
  * @param int $uid
  * @param int $num
  */
 public function editMessageNum($uid, $num)
 {
     Wind::import('WSRV:user.dm.WindidUserDm');
     $dm = new WindidUserDm($uid);
     $dm->addMessages($num);
     return $this->_getUserDs()->editUser($dm);
 }
コード例 #2
0
ファイル: WindidMessageApi.php プロジェクト: fanqimeng/4tweb
 /**
  * 更新消息数
  * Enter description here ...
  * @param int $uid
  * @param int $num
  */
 public function editMessageNum($uid, $num)
 {
     Wind::import('WINDID:service.user.dm.WindidUserDm');
     $dm = new WindidUserDm($uid);
     $dm->addMessages($num);
     $result = $this->_getUserDs()->editUser($dm);
     if ($result instanceof WindidError) {
         return $result->getCode();
     }
     $this->_getNotifyClient()->send('editMessageNum', $uid);
     return (int) $result;
 }
コード例 #3
0
ファイル: UserController.php プロジェクト: YoursBoss/nextwind
 /**
  * 修改用户信息
  */
 public function editUserAction()
 {
     list($uid, $username, $password, $old_password, $email, $question, $answer, $regip, $realname, $profile, $regdate, $gender, $byear, $bmonth, $bday, $hometown, $location, $homepage, $qq, $msn, $aliww, $mobile, $alipay, $addmessages, $messages) = $this->getInput(array('uid', 'username', 'password', 'old_password', 'email', 'question', 'answer', 'regip', 'realname', 'profile', 'regdate', 'gender', 'byear', 'bmonth', 'bday', 'hometown', 'location', 'homepage', 'qq', 'msn', 'aliww', 'mobile', 'alipay', 'addmessages', 'messages'), 'post');
     Wind::import('WSRV:user.dm.WindidUserDm');
     $dm = new WindidUserDm($uid);
     isset($username) && $dm->setUsername($username);
     isset($password) && $dm->setPassword($password);
     isset($old_password) && $dm->setOldpwd($old_password);
     isset($email) && $dm->setEmail($email);
     isset($question) && $dm->setQuestion($question);
     isset($answer) && $dm->setAnswer($answer);
     isset($regip) && $dm->setRegip($regip);
     isset($realname) && $dm->setRealname($realname);
     isset($profile) && $dm->setProfile($profile);
     isset($regdate) && $dm->setRegdate($regdate);
     isset($gender) && $dm->setGender($gender);
     isset($byear) && $dm->setByear($byear);
     isset($bmonth) && $dm->setBmonth($bmonth);
     isset($bday) && $dm->setBday($bday);
     isset($hometown) && $dm->setHometown($hometown);
     isset($location) && $dm->setLocation($location);
     isset($homepage) && $dm->setHomepage($homepage);
     isset($qq) && $dm->setQq($qq);
     isset($msn) && $dm->setMsn($msn);
     isset($aliww) && $dm->setAliww($aliww);
     isset($mobile) && $dm->setMobile($mobile);
     isset($alipay) && $dm->setAlipay($alipay);
     isset($addmessages) && $dm->addMessages($addmessages);
     isset($messages) && $dm->setMessageCount($messages);
     $result = $this->_getUserDs()->editUser($dm);
     if ($result instanceof WindidError) {
         $this->output($result->getCode());
     }
     $this->_getNotifyService()->send('editUser', array('uid' => $uid, 'changepwd' => $dm->password ? 1 : 0), $this->appid);
     $this->output(WindidUtility::result(true));
 }