Code Duplication    Length = 15-15 lines in 2 locations

main/admin/user_import.php 1 location

@@ 86-100 (lines=15) @@
83
        }
84
85
        // 4. Check ClassId
86
        if (!empty($user['ClassId'])) {
87
            $classId = explode('|', trim($user['ClassId']));
88
            foreach ($classId as $id) {
89
                if (in_array($id, $classExistList)) {
90
                    continue;
91
                }
92
                $info = $usergroup->get($id);
93
                if (empty($info)) {
94
                    $user['error'] = sprintf(get_lang('ClassIdDoesntExists'), $id);
95
                    $errors[] = $user;
96
                } else {
97
                    $classExistList[] = $info['id'];
98
                }
99
            }
100
        }
101
102
        // 5. Check authentication source
103
        if (!empty($user['AuthSource'])) {

main/admin/user_update_import.php 1 location

@@ 73-87 (lines=15) @@
70
        }
71
72
        // 4. Check ClassId
73
        if (!empty($user['ClassId'])) {
74
            $classId = explode('|', trim($user['ClassId']));
75
            foreach ($classId as $id) {
76
                if (in_array($id, $classExistList)) {
77
                    continue;
78
                }
79
                $info = $usergroup->get($id);
80
                if (empty($info)) {
81
                    $user['error'] = sprintf(get_lang('ClassIdDoesntExists'), $id);
82
                    $errors[] = $user;
83
                } else {
84
                    $classExistList[] = $info['id'];
85
                }
86
            }
87
        }
88
89
        // 5. Check authentication source
90
        if (!empty($user['AuthSource'])) {