getUserByName from server extension

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

getUserByName from server extension

Postby mistermind » 19 Aug 2010, 19:25

Hi guys,
Is there a way to retrieve the user class from a room instance in the server the same way we do client side?
Client Side example:

Code: Select all

var user:User = sfs.getRoom(1).getUser(uName);


In the Actionscript Server Side documentation (http://www.smartfoxserver.com/docs/docP ... /index.htm) there is a way to get a room by its name from the zone using getRoomByName, but I can't find something similar to it for the room class in order to find the user.
SELECT * FROM users WHERE clue > 0
0 rows returned.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 19 Aug 2010, 20:31

There's a room.getUserByName(uName) method. See if that works :-)
Smartfox's forum is my daily newspaper.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 20 Aug 2010, 21:38

Cool thanks Big Fish =D
Yes in fact there are room.getUserByName(uName) and zone.getUserByName(uName). I found them both on posts from Lapo in some old topics, but its not documented in the online docs (at least not in the AS extensions documentations)
Is there a place where I can check for all the possible methods? My guess is that that documentation is somehow dated.

Maybe the Java extension docs? Even thou its not the same language I can probably guide myself through the method names.
SELECT * FROM users WHERE clue > 0

0 rows returned.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 21 Aug 2010, 01:30

Yea, just use the online java doc. All java methods should also be avaliable in AS (and takes same parameters)
Smartfox's forum is my daily newspaper.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 16 guests