Ejemplo n.º 1
0
 public function checkForumGroup()
 {
     $fid = $this->info['fid'];
     if (!$fid) {
         return new PwError('BBS:forum.thread.exists.not');
     }
     Wind::import('SRV:forum.bo.PwForumBo');
     $forum = new PwForumBo($fid);
     $user = Wekit::getLoginUser();
     $forum->allowVisit($user);
     if (($result = $forum->allowVisit($user)) !== true) {
         return new PwError('BBS:forum.permissions.visit.allow', array('{grouptitle}' => $user->getGroupInfo('name')));
     }
     if (($result = $forum->allowRead($user)) !== true) {
         return new PwError('BBS:forum.permissions.read.allow', array('{grouptitle}' => $user->getGroupInfo('name')));
     }
     return true;
 }