Code Duplication    Length = 4-4 lines in 2 locations

src/Authenticators/LDAPAuthenticator.php 1 location

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

src/Authenticators/LDAPMemberLoginHandler.php 1 location

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