public function getViewableTags(WAPUser &$user) { if ($user->inGroup(WAPDB::getInstance($this->dbType)->getWAPConfig()->getWikiHowAdminGroupName())) { return $this->getTags(); } else { $tags = array(); foreach ($this->getTags() as $aTag) { foreach ($user->getTags() as $uTag) { if ($aTag['raw_tag'] == $uTag['raw_tag']) { $tags[] = $aTag; } } } return $tags; } }