Code Duplication    Length = 4-6 lines in 2 locations

main/inc/lib/social.lib.php 1 location

@@ 1018-1021 (lines=4) @@
1015
1016
        $extra_params = array();
1017
        $course_url = '';
1018
        if (isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) {
1019
            $extra_params['cidReq'] = Security::remove_XSS($_GET['cidReq']);
1020
            $course_url = '&cidReq='.Security::remove_XSS($_GET['cidReq']);
1021
        }
1022
1023
        $html .= '<div class="row">';
1024

main/webservices/user_import/import.lib.php 1 location

@@ 47-52 (lines=6) @@
44
				$errors[] = $user;
45
			}
46
			// 4. Check classname.
47
			if (isset ($user['ClassName']) && strlen($user['ClassName']) != 0) {
48
				if (!ClassManager :: class_name_exists($user['ClassName'])) {
49
					$user['error'] = get_lang('ClassNameNotAvailable');
50
					$errors[] = $user;
51
				}
52
			}
53
			// 5. Check authentication source.
54
			if (isset ($user['AuthSource']) && strlen($user['AuthSource']) != 0) {
55
				if (!in_array($user['AuthSource'], $defined_auth_sources)) {