Code Duplication    Length = 11-11 lines in 2 locations

subscription.php 2 locations

@@ 344-354 (lines=11) @@
341
        // check right to subscribe directly
342
        $allowedWithoutActivationKey = false;
343
        $uid                         = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
344
        if (is_object($xoopsUser) && isset($xoopsUser)) {
345
            // if not anonymous subscriber / subscriber is a Xoops user
346
            $submitter_email = $xoopsUser->email();
347
            foreach ($xoopsUser->getGroups() as $group) {
348
                if (in_array($group, $helper->getConfig('xn_groups_without_actkey'))
349
                    || XOOPS_GROUP_ADMIN == $group) {
350
                    $allowedWithoutActivationKey = true;
351
                    break;
352
                }
353
            }
354
        }
355
        // if anonymous subscriber
356
        // NOP
357
@@ 770-780 (lines=11) @@
767
            // check right to unsubscribe directly
768
            $allowedWithoutActivationKey = false;
769
            $uid                         = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
770
            if (is_object($xoopsUser) && isset($xoopsUser)) {
771
                // if not anonymous subscriber / subscriber is a Xoops user
772
                $submitter_email = $xoopsUser->email();
773
                foreach ($xoopsUser->getGroups() as $group) {
774
                    if (in_array($group, $helper->getConfig('xn_groups_without_actkey'))
775
                        || XOOPS_GROUP_ADMIN == $group) {
776
                        $allowedWithoutActivationKey = true;
777
                        break;
778
                    }
779
                }
780
            }
781
            // if anonymous subscriber
782
            // NOP
783