Exemplo n.º 1
0
        private List <string> CheckSignUpType(SignUpModel signUpModel, string querykey, ODBCPersister persister)
        {
            List <string> validationLogs = new List <string>();
            // if email already exists
            var checkEmailQuery = int.Parse(persister.ExecuteScalar(String.Format(m_helper.GetQueryValue(querykey), signUpModel.UserID)).ToString());

            if (checkEmailQuery > 0)
            {
                validationLogs.Add("UserName with the current email aready exists");
            }
            if (!signUpModel.ValidateUserID())
            {
                validationLogs.Add("Illeagal userName.");
            }
            if (!signUpModel.ValidatePassword())
            {
                validationLogs.Add("Password requirement not satisfied.");
            }
            return(validationLogs);
        }