"For developers", "Server scripts", "Functions description", "Users", "mIsUserTeamLead".
Function to determine if a user is the chief of the department.
function mIsUserTeamLead(iUIN: integer): boolean;
Parameter |
Type |
Value |
---|---|---|
iUIN |
integer |
unique user identifier. |
True, if the user is the chief of the department, False — if not or such UIN does not exist on the server.
const
iUIN = 3;
var
s: string;
begin
if mIsUserTeamLead(iUIN) then s := 'is team leader.' else s := 'isn''t team leader.';
s := mGetUserAttribute(iUIN, 'DisplayName') + ' ' + s;
mLogScript(s, 'INFO');
end.
[13:28:35] (Log "TestTeamLead"): [INFO] John Smith is team leader.
[13:28:35] (Run "TestTeamLead"): Script operation time: 2 ms
[13:28:35] (Run "TestTeamLead"): Script done successfully.