Code Duplication    Length = 4-4 lines in 2 locations

src/Authenticators/LDAPAuthenticator.php 1 location

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

src/Authenticators/LDAPLostPasswordHandler.php 1 location

@@ 119-122 (lines=4) @@
116
        $member = Member::get()->filter('GUID', $this->ldapUserData['objectguid'])->limit(1)->first();
117
118
        // User haven't been imported yet so do that now
119
        if (!$member || !$member->exists()) {
120
            $member = Member::create();
121
            $member->GUID = $this->ldapUserData['objectguid'];
122
        }
123
124
        // Update the users from LDAP so we are sure that the email is correct.
125
        // This will also write the Member record.