5.3.25. If User
Purpose:
Depending on given condition, it runs the first, the second list of instructions or none. If the User event didn't occur, none of the instructions list will be run. (It implies a certain order to be followed; that is, the template containing If User must follow a template containing User). It may be used anywhere in template. It is used to describe the subscription result.
Syntax:
If [not] User <condition>
<list_of_instructions>
[Else [<list_of_instructions>]]
EndIf [User]
where
<condition>= | addok |modifyok |adderror |modifyerror |defined |addaction |modifyaction |loggedin |
addok: the if condition is true if user add action was taken and its result is success
modifyok: the if condition is true if user modify action was taken and its result is success
adderror: the if condition is true if user add action was taken and its result is error
modifyerror: the if condition is true if user modify action was taken and its result is error
addaction: the if condition is true if user add action was taken
modifyaction: the if condition is true if user modify action was taken
defined: the if condition is true if user is defined: old user cookie exists or user is authenticated by IP address. If the user authentication was cookie based the user may not be logged in, but was recognised based on an old cookie that is not valid anymore.
loggedin: the if condition is true if user is properly logged in, whether by cookie or IP based
The list of instructions may contain any instruction allowed in the current context. If it is used inside a list it must respect the constraints of the list (List Issue, List Section, List Article, List Subtitle, List SearchResult).
Constraints:
Cannot be used inside User-EndUser statement.
There are no user contributed notes for this page.