/// <summary>
        /// Get User by username or email address
        /// </summary>
        /// <param name="userNameOrEmail">Username or Email for user</param>
        /// <param name="clientId">Client Id user is associated to</param>
        /// <param name="isEmailSearch">(Optional: defaults to false if not specified) Search by email instead of username</param>
        /// <typeparam name="T">Child of UserInformation</typeparam>
        /// <returns>T</returns>
        public static T GetUser <T>(string userNameOrEmail, int clientId, bool isEmailSearch) where T : UserInformation, new()
        {
            string query = string.Format("SELECT [UserID],[Username],[ClientID],[Email] FROM [tblCOM_Users] WHERE {0} = @UserNameOrEmail AND ClientID = @ClientID",

                                         isEmailSearch ? "[Email]" : "[Username]");

            SQLParamList paramList = new SQLParamList();

            paramList
            .Add("@ClientID", clientId)
            .Add("@UserNameOrEmail", userNameOrEmail);
            SQLDatabaseReporting sql = new SQLDatabaseReporting();

            var dt = sql.QueryDataTable(query, paramList);


            if (sql.HasError)
            {
                foreach (var ex in sql.ExceptionList)
                {
                    ErrorHandler.WriteLog(
                        typeof(UserInformation).FullName,
                        "Database Error Encountered",
                        ErrorHandler.ErrorEventID.SQLError, ex);
                }

                return(null);
            }

            return(dt.Rows.Count < 1 ?
                   null :
                   GetUser <T>(Conversion.StringToInt(dt.Rows[0]["UserID"].ToString(), -1)));
        }