Source: site.view [edit]
Function name: home
Arguments:
Description: 0: sessionkey
Page type: webl
Render function:  
Module: maybeathome

Page source:

// OPTIONALARGS will contain Key on first login, or nil to logout

var sessionkey = wubinfo.cookies.sessionkey ? nil;
if (sessionkey == nil) then
   if (Size(OPTIONALARGS) > 0) then
      sessionkey = OPTIONALARGS[0]
   end
end;
if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then
   sessionkey = nil;
end;
var userInfo = WubCall("siteutil.getSessionInfo", ["maybeathome", sessionkey]);

var ret;

if (userInfo != nil) and (userInfo.arg0 != "buyer") then
   ret = WubCall("maybeathome.sellerHome", OPTIONALARGS);
elsif (userInfo != nil) and (userInfo.arg0 == "buyer") then
   ret = WubCall("maybeathome.buy", OPTIONALARGS);
else
   ret = WubCall("maybeathome.comingSoon", OPTIONALARGS);
end;

ret;