Function to check if a specified user exists at least in one group.
function mIsUserInGroups(iUIN: integer): boolean;
Parameter |
Type |
Value |
---|---|---|
iUIN |
integer |
unique user ID, a number is greater than 0. |
true — user added to one group or more;
false — user does not exist or he is not added to any group.
const
UIN = 6;
var
sDisplayName: string;
begin
if mIsUserInGroups(UIN) then begin
sDisplayName := mGetUserAttribute(UIN, 'DisplayName');
mLogScript('User "' + sDisplayName + '" (UIN ' + IntToStr(UIN) + ') has some groups', '');
end else mLogScript('User don''t have any groups', '');
end.
[15:08:40] (Log "mIsUserInGroups"): User "Alexey pikurov" (UIN 6) has some groups
[15:08:40] (Run "mIsUserInGroups"): Script operation time: 6 ms
[15:08:40] (Run "mIsUserInGroups"): Script done successfully.