Example #1
0
        public void UserSignUp()
        {
            if (!IsValidEmail.IsValidmail(email.text))
            {
                ErrorOutPut(LocalisationSystem.GetLocalisedValue("email_error"));
            }
            else
            {
                if (username.text.Length < 4 || !CreateRGX(username.text).IsMatch(username.text))
                {
                    ErrorOutPut(LocalisationSystem.GetLocalisedValue("username_error"));
                }
                else
                {
                    if (displayName.text.Length < 4 || !CreateRGX(displayName.text).IsMatch(displayName.text))
                    {
                        ErrorOutPut(LocalisationSystem.GetLocalisedValue("displayname_error"));
                    }
                    else
                    {
                        if (password.text.Length < 8 || !CreateRGX(password.text).IsMatch(password.text))
                        {
                            ErrorOutPut(LocalisationSystem.GetLocalisedValue("password_error"));
                        }
                        else
                        {
                            ErrorOutPut("");
                            EventManager.StartListening <string>("OnSignUpResponse", OnSignUpResponse);

                            GS_Authentication.SignUp(username.text, displayName.text, password.text, email.text, "OnSignUpResponse");
                        }
                    }
                }
            }
        }
        public void UserSignUp()
        {
            EventManager.StartListening <string>("OnSignUpResponse", OnSignUpResponse);

            GS_Authentication.SignUp(username.text, displayName.text, password.text, email.text, "OnSignUpResponse");
        }