Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 6548-6551 (lines=4) @@
6545
            'login_user_id = ? ' => $userId,
6546
        );
6547
6548
        if (!empty($from) && !empty($until)) {
6549
            $whereConditions["AND (login_date >= '?' "] = $from;
6550
            $whereConditions["AND logout_date <= DATE_ADD('?', INTERVAL 1 DAY)) "] = $until;
6551
        }
6552
6553
        $trackResult = Database::select(
6554
            'SEC_TO_TIME(SUM(UNIX_TIMESTAMP(logout_date) - UNIX_TIMESTAMP(login_date))) as total_time',

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

@@ 5091-5094 (lines=4) @@
5088
            'AND session_id = ? ' => $sessionId
5089
        );
5090
5091
        if (!empty($from) && !empty($until)) {
5092
            $whereConditions["AND (login_course_date >= '?' "] = $from;
5093
            $whereConditions["AND logout_course_date <= DATE_ADD('?', INTERVAL 1 DAY)) "] = $until;
5094
        }
5095
5096
        $trackResult = Database::select(
5097
            'SUM(UNIX_TIMESTAMP(logout_course_date) - UNIX_TIMESTAMP(login_course_date)) as total_time',