Env Functions¶
Mythradon supports the following Env functions:
env\userAttribute( )¶
The env\userAttribute() function returns the value of the specified ATTRIBUTE of the current user.
Examples:
env\userAttribute() Example
// Return the ID for the Current User
$userId = env\userAttribute('id');
$userId = string\concatenate('UserId: ', $userId);
output\printLine($userId); // Outputs 'UserId: ' + the ID for the Current User
// Return the Name for the Current User
$userName = env\userAttribute('name');
$userName = string\concatenate('UserName: ', $userName);
output\printLine($userName); // Outputs 'UserName: ' + the Name for the Current User
// Return the Type of the Current User. This can be used to determine if the user is a portal user
$userType = env\userAttribute('type');
output\printLine($userType);
Other attributes that are available include:
- id
- createdAt
- emailAddress
- firstName
- gender
- ipAddress
- isActive
- lastName
- limitedAdmin
- limitedAdminPermissions
- middleName
- modifiedAt
- name
- password
- phoneNumber
- portal
- salutationName
- title
- type
- userName
Note
All fields are case sensitive. For example, using env\userAttribute('Id') will not return a value because the correct casing for the attribute is id.
See Also¶
- Array Functions
- Datetime Functions
- Entity Functions
- Env Functions
- Ext Functions
- JSON Functions
- Language Functions
- Number Functions
- Object Functions
- Output Functions
- Password Functions
- Record Functions
- String Functions
- Mythradon Marketing
- Mythradon Sales
- Mythradon Service
- Mythradon System Administration
- Mythradon Tools