info users in database

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
gsources75
Posts: 8
Joined: 06 Sep 2010, 21:37

info users in database

Post by gsources75 »

Hi,

i 'm developing a chat with multiroom. All users are registered and all data are in a SqlServer Database.

Only user logged can load page of chat but how can i get info of every user in chat ?

Code: Select all


var room:Room= smartFox.getRoom(smartFox.activeRoomId);
var user_in_room:Array=	room.getUserList();
for (var i : int = 0; i < user_in_room.length; i++) {
    var user:DataUser= new DataUser();
      user.nickname= user_in_room[i].getName();
     user.imgAvatar= //
    user.id= //
			
}

I can call a .NET page to know user info but is there a method more fast and simply using smartfoxserver?
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

you could store the variables that you need as a user variable. When you join a room, you will get a list of users and their associated variables (such as avatar id etc) as well as when a new user joins a room.

This will get you started
Smartfox's forum is my daily newspaper.
Post Reply