Code Duplication    Length = 4-4 lines in 2 locations

modules/commons/commons_groups/commons_groups.module 1 location

@@ 1124-1127 (lines=4) @@
1121
      return;
1122
    }
1123
1124
    if (!og_check_field_cardinality('user', $account, $settings['field_name'])) {
1125
      $element[0] = array('#markup' => format_plural($field_info['cardinality'], 'You are already registered to another group', 'You are already registered to @count groups'));
1126
      return $element;
1127
    }
1128
1129
    $url = "group/$entity_type/$id/subscribe";
1130
    if ($settings['field_name']) {

modules/commons/commons_trusted_contacts/commons_trusted_contacts.module 1 location

@@ 398-401 (lines=4) @@
395
          return;
396
        }
397
398
        if (!og_check_field_cardinality('user', $account, $settings['field_name'])) {
399
          $element[0] = array('#markup' => format_plural($field_info['cardinality'], 'You are already registered to another group', 'You are already registered to @count groups'));
400
          return $element;
401
        }
402
403
        $token = drupal_get_token('request' . ':' . $id . ':' . $account->uid);
404
        $url = "request-trust/$id/$token/nojs";