Source: site.view [edit]
Function name: getConfigInfo
Arguments: sessionkey
Description:
Page type: webl
Render function:  
Module: magicparties

Page source:

var config = [. card = "7S", message = "Which card, how should I know?  Oh wait, was it the <card>?" .];

var userInfo = WubCall("siteutil.getSessionInfo", ["mpviv", sessionkey]);

if (userInfo != nil) then
   var db = Wub_GetDB("mpviv");
   var coll = Wub_GetCollection(db, "config");
   var dbobj = Wub_NewDBObject([. user = userInfo.username .]); 
   var res = Wub_QueryDB(coll, dbobj, 20);
   if (Size(res) >= 1) then
      config = res[0] ? nil
   end
end;

config;