Code Duplication    Length = 3-3 lines in 2 locations

main/inc/lib/usermanager.lib.php 2 locations

@@ 1296-1298 (lines=3) @@
1293
                $sql_query .= "$field = '$value'";
1294
            }
1295
        }
1296
        if (count($order_by) > 0) {
1297
            $sql_query .= ' ORDER BY '.Database::escape_string(implode(',', $order_by), null, false);
1298
        }
1299
1300
        if (is_numeric($limit_from) && is_numeric($limit_from)) {
1301
            $limit_from = intval($limit_from);
@@ 1341-1343 (lines=3) @@
1338
                $sql_query .= implode(' '.$condition.' ', $temp_conditions);
1339
            }
1340
        }
1341
        if (count($order_by) > 0) {
1342
            $sql_query .= ' ORDER BY '.Database::escape_string(implode(',', $order_by), null, false);
1343
        }
1344
        $sql_result = Database::query($sql_query);
1345
        while ($result = Database::fetch_array($sql_result)) {
1346
            $return_array[] = $result;