Code Duplication    Length = 4-5 lines in 2 locations

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

@@ 5084-5087 (lines=4) @@
5081
            return $count;
5082
        }
5083
5084
        if (!empty($column) && !empty($direction)) {
5085
            $column = str_replace('u.', '', $column);
5086
            $sql .= " ORDER BY $column $direction ";
5087
        }
5088
5089
        $sql .= $limitCondition;
5090
        $result = Database::query($sql);

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

@@ 4082-4086 (lines=5) @@
4079
            $orderBy .= " ORDER BY lastname, firstname ";
4080
        }
4081
4082
        if (!empty($column) && !empty($direction)) {
4083
            // Fixing order due the UNIONs
4084
            $column = str_replace('u.', '', $column);
4085
            $orderBy = " ORDER BY $column $direction ";
4086
        }
4087
4088
        $sql .= $orderBy;
4089
        $sql .= $limitCondition;