/** * 用户(A)取消了对用户(B)关注 * * @param int $uid 用户A * @param int $touid 用户B * @return bool| object PwError() */ public function deleteFollow($uid, $touid) { if (($result = $this->_getAttention()->deleteFollow($uid, $touid)) instanceof PwError) { return $result; } $this->_getTypeDs()->deleteUserType($uid, $touid); $user = $this->_getUser(); $dm = new PwUserInfoDm($uid); $dm->addFollows(-1); $user->editUser($dm, PwUser::FETCH_DATA); $dm = new PwUserInfoDm($touid); $dm->addFans(-1); $user->editUser($dm, PwUser::FETCH_DATA); $this->_getFresh()->deleteAttentionFreshByUid($uid, $touid); PwSimpleHook::getInstance('deleteFollow')->runDo($uid, $touid); return true; }