# Template engine functions
# currentUser()
This Template engine function provides information about the current user context. All fields are available and are freshly fetched from the database.
# Usage
- This function can be implemented for the Template engine by inserting it in the templates.
- To output specific value in the user record you must use the function as the following example:
{currentUser().username.value} => j.doe
{currentUser().firstname.value} => John
- By writing just currentUser().columnName you'll get just the CEType object without the value.
# currentRole()
This template engine function provides information about the current role context. All fields are available and are freshly fetched from the database.
# Usage
- This function can be implemented for the Template engine by inserting it in the templates.
- To output specific value in the role record you must use the function as the following example:
{currentRole().name.value} => Admin
- By writing just currentRole().columnName you'll get just the CEType object without the value.
PS: The only exception is with id. If you want to output it, you don't have to set currentUser().id.value instead:
{currentRole().id}
{currentUser().id}