public void setLoginSiteProperties(User user)
{
if (user == null || StringUtils.isEmpty(user.Uid))
{
throw new ArgumentException("No user ID for site");
}
VistaQuery vq = new VistaQuery("ORWU USERINFO");
string rtn = (String)cxn.query(vq);
if (rtn == null)
{
throw new DataException("Unable to get user info");
}
string[] parts = StringUtils.split(rtn, StringUtils.CARET);
user.Uid = parts[0];
user.setName(parts[1]);
user.OrderRole = parts[5];
vq = new VistaQuery("XWB GET VARIABLE VALUE");
string arg = "@\"^VA(200," + user.Uid + ",1)\"";
vq.addParameter(vq.REFERENCE, arg);
rtn = (string)cxn.query(vq);
if (rtn == "")
{
throw new DataException("Unable to get user SSN");
}
parts = StringUtils.split(rtn, StringUtils.CARET);
user.SSN = new SocSecNum(parts[8]);
}