public long Verify_AdminUser(ref object Common, ref object MyLogix) { String Authtoken = ""; String MyURI; String TransferKey = ""; Boolean Debug = false; if (AdminUserID != 0) { if (Debug) { lCommon.Write_Log("auth.txt", "AppName=" + lCommon.AppName + " - Verify_AdminUser was called, but we already know the AdminUserID=" + AdminUserID, true); } //'we already know who the AdminUser is ... we shouldn't be looking him up more than once Object o = lCommon; lLogix.Load_Roles(ref o, AdminUserID); return(AdminUserID); } //'1st, check the transferkey and see if the user is being transferred into AMS from another product (PrefMan) if (GetCgiValue("transferkey") != String.Empty) { if (Debug) { lCommon.Write_Log("auth.txt", "AppName=" + lCommon.AppName + " - Checking the TransferKey (" + GetCgiValue("transferkey") + ") AdminUserID=" + AdminUserID, true); } TransferKey = GetCgiValue("transferkey"); AdminUserID = lLogix.Auth_TransferKey_Verify(ref lCommon, TransferKey, ref AdminName, ref LanguageID, ref Authtoken); if (Debug) { lCommon.Write_Log("auth.txt", "AppName=" + lCommon.AppName + " - After TransferKey_Verify AdminUserID=" + AdminUserID, true); } if (AdminUserID != 0) { Response.Cookies["AuthToken"].Value = Authtoken; Object o = lCommon; lLogix.Load_Roles(ref o, AdminUserID); return(AdminUserID); } } else { } Authtoken = ""; if (Request.Cookies["AuthToken"] != null) { Authtoken = Request.Cookies["AuthToken"].Value; } if (Debug) { lCommon.Write_Log("auth.txt", "AppName=" + lCommon.AppName + " - AuthToken='" + Authtoken + "' Transferkey='" + GetCgiValue("transferkey") + "'", true); } AdminUserID = 0; AdminUserID = lLogix.Auth_Token_Verify(ref lCommon, Authtoken, ref AdminName, ref LanguageID); if (Debug) { lCommon.Write_Log("auth.txt", "AppName=" + lCommon.AppName + " - After checking AuthToken, AdminUserID=" + AdminUserID, true); } if (AdminUserID == 0) { MyURI = System.Web.HttpUtility.UrlEncode(Request.Url.AbsoluteUri); /* * Send("<!DOCTYPE html ") * Send(" PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN""") * Send(" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">") * Send("<html xmlns=""http://www.w3.org/1999/xhtml"">") * Send("<head>") * Send("<meta http-equiv=""refresh"" content=""0; url=/logix/login.aspx?mode=invalid&bounceback=" & MyURI & """ />") * Send("<title>Logix</title>") * Send("</head>") * Send("<body bgcolor=""#ffffff"">") * Send("<!-- Bouncing -->") * Send("</body>") * Send("</html>") * Response.End()*/ } else { Object o = lCommon; lLogix.Load_Roles(ref o, AdminUserID); } return(AdminUserID); }