public bool AuthenticateAdmin() { try { if (UserProfileObj.GetIsAdmin() == false) { Logger.Instance().Log(Warn.Instance(), new LogInfo(UserProfileObj.GetEmail().ToString() + " tried to access the admin panel but failed. ")); } return(UserProfileObj.GetIsAdmin()); } catch (ArgumentException AEX) { Logger.Instance().Log(Warn.Instance(), new WarnDebug("Anonymous user tried to access the Admin panel, but failed")); throw AEX; } catch (NullReferenceException nex) { Logger.Instance().Log(Fatal.Instance(), new LogInfo("Unable to authenticate Admin, got exception : " + nex.Message.ToString())); throw nex; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }