Access to the profile object
The profile object can only be accessed using the function getCurrentUser. This is available in the eMailing- and LeadPage template, as well as in the article template, websites, SVGs and forms.
THIS/getCurrentUser
See also:
- eMailing/LeadPage:getCurrentUser
- Article:getCurrentUser
- Form:getCurrentUser
- Website/SVG:getCurrentUser
Functions of the profile object
The profile object provides a number of functions for accessing pool fields of the current profile:
getValues
Returns a searched attribute of the current profile.
Syntax
THIS/getCurrentUser/getValues/<name>
Parameters
name = internal name for the attribute searched for
Return value
Use
<div tal:content="THIS/getCurrentUser/getValues/NAME"> </div>
<div>Sampleman/div>
See also:
getValuesRaw
Returns the internal representation (for example ID) of the searched attribute of the current profile.
Syntax
THIS/getCurrentUser/getValuesRaw/<name>
Parameters
name = internal name for the attribute searched for
Return value
Use
<div tal:content="THIS/getCurrentUser/getValuesRaw/SALUTATION"> </div> <div tal:content=
"THIS/getCurrentUser/getValues/SALUTATION"> </div>
<div>2/div> div> div> mr>/div>
See also:
isDummy
Specifies whether the profile is the test profile of the system. This is always the case if no profile could be identified, for example in the preview.
Syntax
THIS/getCurrentUser/isDummy
Return value
Boolean
Note
The test profile is not used for forms. Therefore, the isDummy function cannot be used on forms.
Use
<div>test profile/div>
<div>no test profile/div>
See also:
isTrackable
Indicates whether the current profile has agreed to tracking.
Syntax
THIS/getCurrentUser/isTrackable
Return value
Boolean
Use
<div>tracking allowed/div>
<div>no tracking allowed div>
See also:
isInTargetGroup
Indicates whether the current profile is assigned to a given target group.
Syntax
THIS/getCurrentUser/isInTargetGroup/selfRef/<id>
Parameters
id = ID of the target group
Return value
Boolean
Note
If target groups with many or complex filters are queried via TAL, this causes considerable delays in sending the mailing. For each email, the target group searched for is recalculated.
Use
<div> profile included in target group</div>
<div>profile not included in target group</div>