Table of Contents

Codeunit "User Login Time Tracker"

ID 9026
Namespace: System.Security.User

Exposes functionality to retrieve information about the user's first, penultimate and last login times.

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

IsFirstLogin

Returns true if this is the first time the user logs in to the current company.

procedure IsFirstLogin(UserSecurityID: Guid): Boolean

Parameters

Name Type Description
UserSecurityID Guid

The User Security ID.

Returns

Type Description
Boolean

True if this is the first time the user logs in and false otherwise.

AnyUserLoggedInSinceDate

Returns true if any user logged in to the current company on or after the specified date.

procedure AnyUserLoggedInSinceDate(FromDate: Date): Boolean

Parameters

Name Type Description
FromDate Date

The date to start searching from.

Returns

Type Description
Boolean

True if any user logged in on or after the specified date and false otherwise.

UserLoggedInSinceDateTime

Returns true if the current user logged in to the current company at or after the specified DateTime.

procedure UserLoggedInSinceDateTime(FromDateTime: DateTime): Boolean

Parameters

Name Type Description
FromDateTime DateTime

The DateTime to start searching from.

Returns

Type Description
Boolean

True if the current user logged in at or after the specified DateTime and false otherwise.

UserLoggedInEnvironment

Checks whether a user has logged in to the current environment (to any of the companies) in the past.

procedure UserLoggedInEnvironment(UserSecurityID: Guid): Boolean

Parameters

Name Type Description
UserSecurityID Guid

The User Security ID.

Returns

Type Description
Boolean

True if the user has logged in to any of the companies; otherwise - false.

GetPenultimateLoginDateTime

Returns the penultimate login DateTime of the current user for the current company.

procedure GetPenultimateLoginDateTime(): DateTime

Returns

Type Description
DateTime

The penultimate login DateTime of the current user, or 0DT if the user login cannot be found.

GetPenultimateLoginDateTime

Returns the penultimate login DateTime of a user for the current company.

procedure GetPenultimateLoginDateTime(UserSecurityID: Guid): DateTime

Parameters

Name Type Description
UserSecurityID Guid

The security ID of the user.

Returns

Type Description
DateTime

The penultimate login DateTime of a user, or 0DT if the user login cannot be found.

See also