Пример #1
0
    protected void myEmail_ServerValidate(object sender, ServerValidateEventArgs e)
    {
        string error = Data_AppUserFile.Check_Email(Email.Text);

        if (error != null)
        {
            e.IsValid            = false;
            myEmail.ErrorMessage = error;
        }
    }
Пример #2
0
    protected void checkEmail_ServerValidate(ref bool bOk)
    {
        IMyLog log = MyLog.GetLogger("Register");

        resetError(errorEmail);
        string error = Data_AppUserFile.Check_Email(Email.Text);

        if (error != null)
        {
            setError(errorEmail, error, ref bOk);
        }
        else if (DSSwitch.appUser().HasAccount(Email.Text, log))
        {
            setError(errorEmail, "Email is already registred.", ref bOk);
        }
        else if (isOnBlacklist(Email.Text))
        {
            log.Debug("Blacklisted " + Email.Text + " refused");
            setError(errorEmail, "Email is invalid", ref bOk);
        }
    }