Code Duplication    Length = 3-3 lines in 2 locations

code/decorators/TrainingMemberDecorator.php 1 location

@@ 46-48 (lines=3) @@
43
    {
44
        // Because we are using a ConfirmedPasswordField, the password will
45
        // be an array of two fields
46
        if (isset($data['Password']) && is_array($data['Password'])) {
47
            $data['Password'] = $data['Password']['_Password'];
48
        }
49
50
        // We need to ensure that the unique field is never overwritten
51
        $uniqueField = Member::get_unique_identifier_field();

code/form/TrainingSignupForm.php 1 location

@@ 51-53 (lines=3) @@
48
49
    public function doSave($data, $form)
50
    {
51
        if (isset($data['Password']) && is_array($data['Password'])) {
52
            $data['Password'] = $data['Password']['_Password'];
53
        }
54
55
        // We need to ensure that the unique field is never overwritten
56
        $uniqueField = Member::get_unique_identifier_field();