MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system


TMsgServer.InsertUser
TMsgServer
Top 

Adds new user with specified details to the registered users database at this server.

procedure InsertUser(var UserInfo: TMsgBaseUserInfo);

Description
Call InsertUser to add new user with details specified in UserInfo to the server database. InsertUser checks for user with the same UserID and sets new unique UserID in UserInfo specified detais if the user with specified identifier is already existing, then inserts new user.

Note: UserInfo.UserID will be equal to identifier of new user being inserted, it can changed if the user with the same UserID is already registered.  
To learn what identifier will be equal to before adding new user, you can call GetNewUserID to reserve new unique UserID identifier, then prepare UserInfo with UserInfo.UserID equal to the result of GetNewUserID calling and call InsertUser to finalize addition of new user.  
Also you can determine if the user is already exist by calling IsUserExisting, but in this case you have no guarantee that anybody takes this UserID first.  




© AidAim Software MsgCommunicator: