Move a user from one group of the common contact list to another group.
function mMoveUserToDepartment(iUIN, iGroupID: integer): integer;
Parameter |
Type |
Value |
---|---|---|
iUIN |
integer |
user ID; |
iGroupID |
integer |
group ID in a common contact group. |
0 function executed successfully; a user moved from old group of the common contact list to the new one;
-1 you can't work with built-in bot (UIN=0)
-2 common contact list is empry;
-3 user with such UIN is not registered on the server;
-4 user with such UIN does not exist in the common contact list;
-5 group with such ID does not exist in the common contact list.
var
iUIN, iNewDeptID: integer;
begin
iUIN := 3;
iNewDeptID := mGetDepartmentIDByTextPath('TestDivision');
if iNewDeptID > 0 then begin
mMoveUserToDepartment(iUIN, iNewDeptID);
mCommonContactsRebuild;
end;
end.