User Class

This object represents a user in a Form instance. An instance is a completed Form, or one that is currently being edited.

When developing Form scripts (in the various callback methods such as BP_Event), you are automatically given an instance of the “current” user with the CurrentUser variable.

Properties

PROPERTY NAME

DATA TYPE

DESCRIPTION

AuthType

Code Enum

The type of user.

User.eAuth is an enum which can return:
User.eAuth.Unknown,

User.eAuth.BuiltIn

User.eAuth.Windows

User.eAuth.Windows

User.eAuth.LDAP

User.eAuth.External

User.eAuth.SAML|

User.eAuth.Header

AutoDST

Boolean

Is DST enabled for user?

AvgLoginSeconds

Integer

The average number of seconds the user remains logged in.

Company

tblTaskList

The optional company associated with this user

Culture

tblTaskList

A string value containing the User's culture information derived from the .NET CultureInfo Class.

CustomDate

DateTime

Optional custom date/time associated with user

CustomNumber

Decimal

Optional custom number associated with user

CustomString

tblTaskList

Optional custom string associated with user

CustomString2

tblTaskList

Optional second custom string associated with user

Delegate

User Object

A different user to which the user delegates (if null, the user has no delegate)

Dept

tblTaskList

The optional department associated with this user

Description

tblTaskList

The optional description associated with this user

Disabled

Boolean

A Boolean value that returns "true" if the user is disabled.

DisplayString

tblTaskList

Returns either the UserName if configured, or the UserID

Domain

tblTaskList

Optional domain if user is a Windows user

Email

tblTaskList

Email address of user

ExternalGUID

tblTaskList

The optional external unique ID associated with this user

Groups

List Object

The list of groups to which the user belongs, returned as List<Group>. If you need to check whether a large number of users are in a specific group, it may be more efficient to use the Group.HasUser() function.

ImpersonatedBy

User Object

If the user is being impersonated, this will be a string containing the name of the impersonating user.

LastActivity

DateTime

Timestamp of last activity for user

Locked Boolean A Boolean value that returns "true" if the user account is locked.

NumLogins

Integer

The number of times the user has logged in.

Office

String

The optional office associated with this user

Phone

String

The optional phone number associated with this user

SessionObjects

Dictionary Object

Returns a dictionary of attributes that can associated with this user while logged in, returned as a Dictionary<Key,Value>

Tasks

List Object

Returns the list of Tasks for the user, returned as a List<task>

TimeZone

String

Time zone of user

Title

String

The optional title associated with this user

UID

String

The internal ID of the user

UserID

String

The unique string to identify the user

UserName

String

The "friendly" name of the user (for display)

Example

// Setting a variable to the current username
var cUser = CurrentUser.UserName;

Methods