Ejemplo n.º 1
0
        /// <summary>
        /// Checks existance of given email in the database
        /// </summary>
        /// <param name="email"></param>
        /// <returns>bool wrapped in EMResponse object</returns>
        public string emailIsUnique(string email)
        {
            EMResponse response = new EMResponse();
            try
            {
                accountMgr = new AccountManager();
                response.data = EMConverter.fromObjectToJSON(accountMgr.emailIsUnique(email));

                response.status = ok;
            }
            catch (Exception e)
            {
                response.status = error;
                response.data = e.Message;
            }

            return EMConverter.fromObjectToJSON(response);
        }