Code Duplication    Length = 11-12 lines in 2 locations

src/Controllers/ForumMemberProfile.php 2 locations

@@ 354-364 (lines=11) @@
351
        $openid = trim($data['OpenIDURL']);
352
        Session::set("FormInfo.Form_RegistrationWithOpenIDForm.data", $data);
353
354
        if (strlen($openid) == 0) {
355
            if (!is_null($form)) {
356
                $form->setFieldMessage(
357
                    "Blurb",
358
                    "Please enter your OpenID or your i-name.",
359
                    "bad"
360
                );
361
            }
362
363
            return $this->redirectBack();
364
        }
365
366
        $trust_root    = Director::absoluteBaseURL();
367
        $return_to_url = $trust_root . $this->Link('processopenidresponse');
@@ 373-384 (lines=12) @@
370
371
        // No auth request means we can't begin OpenID
372
        $auth_request = $consumer->begin($openid);
373
        if (!$auth_request) {
374
            if (!is_null($form)) {
375
                $form->setFieldMessage(
376
                    "Blurb",
377
                    "That doesn't seem to be a valid OpenID or i-name identifier. " .
378
                    "Please try again.",
379
                    "bad"
380
                );
381
            }
382
383
            return $this->redirectBack();
384
        }
385
386
        $identity = Convert::raw2sql($auth_request->endpoint->claimed_id);
387
        if ($member = Member::get()->filter('IdentityURL', $identity)->first()) {