Пример #1
0
        protected void ResetPassword_Click(object sender, EventArgs e)
        {
            //send an email to the user
            try
            {
                Incremental.Kick.Dal.User userTable = UserBR.GetUserByEmail(this.Email.Text.Trim());


                //send a mail to the user with a link to change the password
                UserBR.SendPasswordResetEmail(userTable.UserID, this.KickPage.HostProfile);
                ConfirmationMessageLabel.Text = "An email has been sent to " + this.Email.Text + ", please check your mail.";
            }
            catch (Exception)
            {
                ErrorMessageLabel.Text = "Sorry, we have no account with that email address";
            }
        }
Пример #2
0
        protected void btnChangeEmail_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                ChangeEmailPanel.Visible = false;
                if (!String.IsNullOrEmpty(Email.Text))
                {
                    Incremental.Kick.Dal.User userTable = UserBR.GetUserByEmail(Email.Text.Trim());

                    if (userTable == null)
                    {
                        Kick.Helpers.EmailHelper.SendChangedEmailEmail(Email.Text, this.KickPage.KickUserProfile.Username, this.KickPage.KickUserProfile.Email, this.KickPage.HostProfile);
                        SuccessPanel.Visible = true;
                    }
                    else
                    {
                        FailedPanel.Visible = true;
                    }
                }
            }
        }