Esempio n. 1
0
 public static function groupsDiscussionDelete($userId, $groupId)
 {
     $group = CFactory::getModel('groups');
     if (!COwnerHelper::isRegisteredUser()) {
         CAccess::setError('blockUnregister');
         return false;
     } else {
         if (!COwnerHelper::isCommunityAdmin() && !$group->isAdmin($userId, $groupId)) {
             CACCESS::setError(JText::_('COM_COMMUNITY_NOT_ALLOWED_TO_REMOVE_WALL'));
             return false;
         } else {
             return true;
         }
     }
 }