Example #1
0
    void Register()
    {
        if (m_email == "")
        {
            DialogBase.Show("REGISTER EMAIL", "INVALID EMAIL(NULL).");
            return;
        }

        string expression = @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)" + @"|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";

        if (!System.Text.RegularExpressions.Regex.IsMatch(m_email, expression))
        {
            DialogBase.Show("REGISTER EMAIL", "INVALID EMAIL ADDRESS.");
            return;
        }

        if (m_pwd != m_pwd2)
        {
            DialogBase.Show("REGISTER EMAIL", "YOUR NEW AND CONFIRM PASSWORDS\n ARE DIFFERENT, PLEASE RETRY.");
            return;
        }

        if (m_pwd == "")
        {
            DialogBase.Show("REGISTER EMAIL", "INVALID PASSWORD(NULL).");
            return;
        }

        m_pwdMD5 = Tools.GetMD5(m_pwd);
        Reception recp = GameObject.Find("Reception").GetComponent <Reception>();

        recp.RegisterByEmail(m_email, m_pwdMD5, AfterRegisterByEmail);
    }