Code Duplication    Length = 4-4 lines in 2 locations

code/authenticators/LDAPAuthenticator.php 1 location

@@ 132-135 (lines=4) @@
129
130
        // LDAPMemberExtension::memberLoggedIn() will update any other AD attributes mapped to Member fields
131
        $member = Member::get()->filter('GUID', $data['objectguid'])->limit(1)->first();
132
        if (!($member && $member->exists())) {
133
            $member = new Member();
134
            $member->GUID = $data['objectguid'];
135
        }
136
137
        // Update the users from LDAP so we are sure that the email is correct.
138
        // This will also write the Member record.

code/authenticators/LDAPLoginForm.php 1 location

@@ 147-150 (lines=4) @@
144
145
        $member = Member::get()->filter('GUID', $userData['objectguid'])->limit(1)->first();
146
        // User haven't been imported yet so do that now
147
        if (!($member && $member->exists())) {
148
            $member = new Member();
149
            $member->GUID = $userData['objectguid'];
150
        }
151
152
        // Update the users from LDAP so we are sure that the email is correct.
153
        // This will also write the Member record.