IsCurrentUserOrDeputy

Checks if user specified in first parameter is current user or deputy of current user.

Syntax

IsCurrentUserOrDeputy("user","[checkIfAdmin]");

Function arguments

  • user – (String) Login of the user to be checked
  • checkIfAdmin – (String) [Optional] If set to true then function will returns true if current user is system administrator

Return value

This function returns Boolean.
Returns true if current user is equal to user that is specified in parameter or current user is deputy of the user specified in parameter

Examples

Example 1:
Function will check if current user is user from Manager field or current user is deputy of the user from Manager field. This function call is equivalent of two conditions: CurrentUser()==[Manager] || IsDeputyOf(CurrentUser(),[Manager])

valid = IsCurrentUserOrDeputy([Manager]);

Example 2:
Function will check if current user is user from Manager field or current user is deputy of the user from Manager field or current user is system administrator

valid = IsCurrentUserOrDeputy([Manager],true);
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.