Code Duplication    Length = 4-4 lines in 2 locations

src/Authenticators/LDAPMemberLoginHandler.php 1 location

@@ 69-72 (lines=4) @@
66
67
        $member = Member::get()->filter('GUID', $userData['objectguid'])->limit(1)->first();
68
        // User haven't been imported yet so do that now
69
        if (!($member && $member->exists())) {
70
            $member = new Member();
71
            $member->GUID = $userData['objectguid'];
72
        }
73
74
        // Update the users from LDAP so we are sure that the email is correct.
75
        // This will also write the Member record.

src/Authenticators/LDAPAuthenticator.php 1 location

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