Before you go on further with actual coding , you need to know the following . FreiChat uses three functions get_guests() , get_users() or get_buddies() for fetching the users & their corresponding data . But all the functions do not get called .
These functions are defined in ~/freichat/server/drivers/Custom.php It depends on your FreiChat backend settings.
For example , if you choose to show guests only the get_guests() will be called and if you choose to show users , get_users() will be called .