Code Duplication    Length = 11-11 lines in 2 locations

subscription.php 2 locations

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