extension to get users info
Posted: 12 Oct 2010, 22:16
Ok I know that there are tutorial for DataBase Extension but i don't understand..... sorry
OK i 'm developing a multi-rooms chat, the users is recorded in a Sql server database.
i have this code in config.xml
Ok and after ?
I don't understand i can get all info of an user when smatfoxserver send all client.
I use this code to get all users in activeRoom
I want that inside SmartFox User class there are propieties such us avatar, age, and other info of complete profile of user logged
OK i 'm developing a multi-rooms chat, the users is recorded in a Sql server database.
i have this code in config.xml
Code: Select all
<DatabaseManager active="true">
<Driver>org.gjt.mm.mysql.Driver</Driver>
<ConnectionString>jdbc:mysql://192.168.0.15:3306/sfsTest</ConnectionString>
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM users]]></TestSQL>
<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
I don't understand i can get all info of an user when smatfoxserver send all client.
I use this code to get all users in activeRoom
Code: Select all
public function getUserRoom() : Array {
var room : Room = smartFox.getRoom(smartFox.activeRoomId);
var user_in_room : Array = room.getUserList();
var all_users : Array = new Array();
for (var u:String in user_in_room) {
var user_fox:User= user_in_room[u];
all_users.push(user_fox);
}
return all_users;
}