Table of contents

Official Content

Updates session status to Expired, optimizing the use of the GAMRepository.GetSessionLog() method accurately.


GeneXusSecurity.GAM.UpdateExpiredSessionLog(&GAMProcessSessionLogFilter, &Errors): Boolean


If a session hasn't been used again since its expiration, its status may stay active, despite being expired after the session timeout.

In such case, the use of the GAMRepository.GetSessionLog() will return more active (or expired) sessions than the actual number.

The UpdateExpiredSessionLog method updates session status to "Expired" for those active, when in fact they should be expired. It receives a variable as parameter that is based on the GAMProcessSessionLogFilter external object. It returns True if the change was made correctly, or False if it wasn't.

Note: a Commit must be done

When the method's execution indicates error, it can be handled by the method's second parameter, which is based on collection data type. This optimizes the use of the GAMRepository.GetSessionLog() method, with more accurate results.


// Set expired sessions from yesterday
&GAMProcessSessionLogFilter = new()
&GAMProcessSessionLogFilter.CleanUpToDate = &Today.AddDays(-1)
&isOK = GeneXusSecurity.GAM.UpdateExpiredSessionLog(&GAMProcessSessionLogFilter, &Errors)
If &isOK


This method is available since GeneXus 16 Upgrade 7.


Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant