protected bool UserFetchTest(out string exceptionMessage) { exceptionMessage = String.Empty; try { UserInfoDerived ui = UserInformation.GetUser <UserInfoDerived>(1); if (ui == null || ui.UserID == -1) { exceptionMessage = "Unable to load user."; } else { return(true); } } catch (Exception ex) { exceptionMessage = ex.ToString(); } return(false); }
protected bool UserLoginTest(out string exceptionMessage) { exceptionMessage = String.Empty; try { int outputVal; UserInfoDerived ui = UserInformation.LogUserIn <UserInfoDerived>("username", "xxxxx", false, 88, out outputVal); if (ui == null || ui.UserID == -1) { exceptionMessage = "Error. OutputVal: " + outputVal; } else { return(true); } } catch (Exception ex) { exceptionMessage = ex.ToString(); } return(false); }