diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index abe2acfada..81ac355874 100644 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -1,4 +1,4 @@ -= CURDATE() OR date_start='0000-00-00') + AND + ( CURDATE() >= DATE_SUB(date_start, INTERVAL nb_days_access_before_beginning DAY) AND + CURDATE() <= ADDDATE(date_end, INTERVAL nb_days_access_after_end DAY) OR + date_start='0000-00-00') ORDER BY date_start, date_end, name"; $result = api_sql_query($sessions_sql,__FILE__,__LINE__);