Set the user's buddy list, group list, user attributes, and send data synchronization instructions in the User logon success event:
User Login successful callback function definition
typedef void (callback* Bras_onuserloginaction_callback) (DWORD Dwuserid, LPCTSTR szUserName, DWORD Dwlevel, LPCTSTR SZIPADDR, LPVOID lpuservalue);
Copy Code I. Adding groups of users
DWORD dwgroupid = 1;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_addgroup, dwgroupid, 0, "my Friends");
dwGroupID = 2;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_addgroup, dwgroupid, 0, "company colleague");
Copy Code Second, add user friends
DWORD Dwfrienduserid = 10010;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_addfriend, Dwfrienduserid);
Dwfrienduserid = 10011;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_addfriend, Dwfrienduserid);
Copy Code Third, set the relationship between friends and groups (that is, which group a friend belongs to)
DWORD dwgroupid = 1;
DWORD Dwfrienduserid = 10010;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_setgrouprelation, dwGroupID, dwFriendUserId);
dwGroupID = 2;
Dwfrienduserid = 10011;
Bras_userinfocontrol (Dwuserid, Bras_userinfo_ctrlcode_setgrouprelation, dwGroupID, dwFriendUserId);
Copy Code Iv. Setting up user information (user profile)
Bras_setuserinfo (Dwuserid, 1, "my signature");
Bras_setuserinfo (Dwuserid, 2, "020-85276986");
......
Copy Code V. Synchronize the previously set data to the client
Bras_userinfocontrol (Dwuserid, bras_userinfo_ctrlcode_syncdata, 0, 0);
Copy Code |