/// <summary>
        /// Takes in an Email and returns a LDAP Object(Person Object) of that User
        /// </summary>
        /// <param name="emailAlias"></param>
        /// <returns>LDAPuser</returns>
        public static LDAPuser getLDAPEntryByEmailAlias(string emailAlias)
        {
            // Split the email address and get the contents before the @
            string[] splitEmailAlias = emailAlias.Split('@');
            string   templeEduTUNA   = splitEmailAlias[0];

            // Create the WebService proxy, send the search request and receive the TempleLDAPEntry object
            WS_LDAPSearch.LDAP_Search       ldapProxy = new WS_LDAPSearch.LDAP_Search();
            WS_LDAPSearch.TempleLDAPEntry[] results   = new WS_LDAPSearch.TempleLDAPEntry[1];
            results = ldapProxy.Search(webServiceUsername, webServicePassword, "templeEduTUNA", templeEduTUNA);
            WS_LDAPSearch.TempleLDAPEntry resultEntry = results[0];

            // Check if request was successful
            if (resultEntry.error == null) // Success
            {
                // Create our TempleLDAPEntry object to be returned
                LDAPuser personLDAPEntry = new LDAPuser();
                personLDAPEntry.templeEduID                 = resultEntry.templeEduTUID;
                personLDAPEntry.uID                         = resultEntry.uid;
                personLDAPEntry.cn                          = resultEntry.cn;
                personLDAPEntry.givenName                   = resultEntry.givenName;
                personLDAPEntry.sn                          = resultEntry.sn;
                personLDAPEntry.eduPersonAffiliation        = resultEntry.eduPersonAffiliation;
                personLDAPEntry.eduPersonPrimaryAffiliation = resultEntry.eduPersonPrimaryAffiliation;
                personLDAPEntry.mail                        = resultEntry.mail;
                personLDAPEntry.title                       = resultEntry.title;
                return(personLDAPEntry);
            }
            else // Something went wrong..
            {
                return(null);
            }
        }
        /// <summary>
        /// takes in a faculty TUID and returns a string of the title(ie. Employee, Faculty) they hold
        /// </summary>
        /// <param name="TUID"></param>
        /// <returns>String</returns>
        public static String getFacultyTitleByTUID(string TUID)
        {
            // Create the WebService proxy, send the search request and receive the TempleLDAPEntry object
            WS_LDAPSearch.LDAP_Search       ldapProxy = new WS_LDAPSearch.LDAP_Search();
            WS_LDAPSearch.TempleLDAPEntry[] results   = new WS_LDAPSearch.TempleLDAPEntry[1];
            results = ldapProxy.Search(webServiceUsername, webServicePassword, "templeEduTUID", TUID);
            WS_LDAPSearch.TempleLDAPEntry resultEntry = results[0];

            // Check if request was successful
            if (resultEntry.error == null) // Success
            {
                string[] affiliations = resultEntry.eduPersonAffiliation.Split(',');
                foreach (string s in affiliations)
                {
                    if (s.Equals("faculty"))
                    {
                        return(resultEntry.title);
                    }
                }

                return(null);
            }
            else // Something went wrong..
            {
                return(null);
            }
        }
        /// <summary>
        /// Takes in an accessnet and returns an LDAPuser (Person Object) based on that AccessnetID
        /// </summary>
        /// <param name="accessnetID"></param>
        /// <returns>LDAPuser</returns>
        public static LDAPuser getLDAPEntryByAccessnet(string accessnetID)
        {
            // Create the WebService proxy, send the search request and receive the TempleLDAPEntry object
            WS_LDAPSearch.LDAP_Search       ldapProxy = new WS_LDAPSearch.LDAP_Search();
            WS_LDAPSearch.TempleLDAPEntry[] results   = new WS_LDAPSearch.TempleLDAPEntry[1];
            results = ldapProxy.Search(webServiceUsername, webServicePassword, "uid", accessnetID);
            WS_LDAPSearch.TempleLDAPEntry resultEntry = results[0];

            // Check if request was successful
            if (resultEntry.error == null) // Success
            {
                // Create our TempleLDAPEntry object to be returned
                LDAPuser personLDAPEntry = new LDAPuser();
                personLDAPEntry.templeEduID                 = resultEntry.templeEduTUID;
                personLDAPEntry.uID                         = resultEntry.uid;
                personLDAPEntry.cn                          = resultEntry.cn;
                personLDAPEntry.givenName                   = resultEntry.givenName;
                personLDAPEntry.sn                          = resultEntry.sn;
                personLDAPEntry.eduPersonAffiliation        = resultEntry.eduPersonAffiliation;
                personLDAPEntry.eduPersonPrimaryAffiliation = resultEntry.eduPersonPrimaryAffiliation;
                personLDAPEntry.mail                        = resultEntry.mail;
                personLDAPEntry.title                       = resultEntry.title;
                return(personLDAPEntry);
            }
            else // Something went wrong..
            {
                return(null);
            }
        }