Code Duplication    Length = 4-4 lines in 2 locations

src/Authenticators/LDAPAuthenticator.php 1 location

@@ 146-149 (lines=4) @@
143
144
        // LDAPMemberExtension::memberLoggedIn() will update any other AD attributes mapped to Member fields
145
        $member = Member::get()->filter('GUID', $data['objectguid'])->limit(1)->first();
146
        if (!($member && $member->exists())) {
147
            $member = new Member();
148
            $member->GUID = $data['objectguid'];
149
        }
150
151
        // Update the users from LDAP so we are sure that the email is correct.
152
        // This will also write the Member record.

src/Authenticators/LDAPLoginForm.php 1 location

@@ 155-158 (lines=4) @@
152
153
        $member = Member::get()->filter('GUID', $userData['objectguid'])->limit(1)->first();
154
        // User haven't been imported yet so do that now
155
        if (!($member && $member->exists())) {
156
            $member = new Member();
157
            $member->GUID = $userData['objectguid'];
158
        }
159
160
        // Update the users from LDAP so we are sure that the email is correct.
161
        // This will also write the Member record.