/** * 修改用户信息 */ 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)); }