//--------------------------------------------------------------------------------
        // onClickForgotPassword
        //--------------------------------------------------------------------------------
        public void onClickForgotPassword()
        {
            if (inputUsername != null &&
                inputEmail != null)
            {
                if (LoomClient.validateName(inputUsername.text) ||
                    LoomClient.validateEmail(inputEmail.text)
                    )
                {
                    string[] fields = new string[] { inputUsername.text, inputEmail.text };

                    TemporaryDisable(buttonForgot);

                    LoomClient.ActionForgotPassword(fields, onCallbackForgotPassword);
                }
                else
                {
                    FindObjectOfType <LC_UIPanelMessage>().Show(LoomClient.LANG_ERROR);
                }
            }
            else
            {
                Debug.LogWarning(LoomClient.LANG_EDITOR_MISSING + this.name);
            }
        }
Пример #2
0
        //--------------------------------------------------------------------------------
        // onClickChangeEmail
        //--------------------------------------------------------------------------------
        public void onClickChangeEmail()
        {
            if (inputEmail != null &&
                inputPassword != null)
            {
                if (LoomClient.validateEmail(inputEmail.text) &&
                    LoomClient.validatePassword(inputPassword.text) &&
                    inputEmail.text != LoomClient.Account.accountEmail
                    )
                {
                    string[] fields = new string[] { inputEmail.text, inputPassword.text };

                    TemporaryDisable(buttonChange);

                    LoomClient.ActionChangeAccountEmail(fields, onCallbackChangeEmail);
                }
                else
                {
                    FindObjectOfType <LC_UIPanelMessage>().Show(LoomClient.LANG_ERROR);
                }
            }
            else
            {
                Debug.LogWarning(LoomClient.LANG_EDITOR_MISSING + this.name);
            }
        }