/** * 编辑用户信息 * * @param PwUserInfoDm $dm 用户信息DM * @param int $type 更新类型 * @return boolean|PwError */ public function editUser(PwUserInfoDm $dm, $type = self::FETCH_ALL) { if (true !== ($result = $dm->beforeUpdate())) { return $result; } if (is_object($dm->dm)) { $result = $this->_getWindid()->editDmUser($dm->dm); if ($result < 1) { return new PwError('WINDID:code.' . $result); } } $result = $this->_getDao($type)->editUser($dm->uid, $dm->getData(), $dm->getIncreaseData(), $dm->getBitData()); PwSimpleHook::getInstance('PwUser_update')->runDo($dm); return true; }