Print

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);
Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?