예제 #1
0
def confirm_change_email(email, token):
    if current_user.confirm(token):
        current_user.change_email(email)
        flash('You changed your email address')
    else:
        flash('The confirmation link is invalid or has expired')
    return redirect(url_for('index'))
예제 #2
0
파일: views.py 프로젝트: kefatong/ops
def change_email(token):
    if current_user.change_email(token):
        flash(u'修改邮箱地址成功!')
    else:
        flash(u'修改邮箱失败! 请尝试重新修改!')

    return redirect(url_for('main.index'))
예제 #3
0
def change_email(token):
    if current_user.change_email(token):
        flash('you email addr has been updated')
    else:
        flash('Invaild requests')

    return redirect(url_for('main.index'))
예제 #4
0
파일: views.py 프로젝트: Rain1996/Rblog
def change_email(token):
    if current_user.change_email(token):
        db.session.commit()
        flash("You have changed your email!")
    else:
        flash("Invalid request")
    return redirect(url_for('main.index'))
def change_email(token):
    ''' tokens set to reset their emails'''
    if current_user.change_email(token):
        flash('Your email address hass been updated')
    else:
        flash('Invalid request')
    return redirect(url_for('main.index'))        
예제 #6
0
def change_email(token):
	if current_user.change_email(token):
		flash('you email addr has been updated')
	else:
		flash('Invaild requests')

	return redirect(url_for('main.index'))
예제 #7
0
파일: views.py 프로젝트: kefatong/ops
def change_email(token):
    if current_user.change_email(token):
        flash(u'修改邮箱地址成功!')
    else:
        flash(u'修改邮箱失败! 请尝试重新修改!')

    return redirect(url_for('main.index'))
예제 #8
0
def change_email(token):
    '''确认邮件视图函数'''
    if current_user.change_email(token):
        flash('邮箱已修改成功')
    else:
        flash('邮箱未修改')
    return redirect(url_for('main.index'))
예제 #9
0
파일: views.py 프로젝트: usemodj/book
def change_email(token):
    if current_user.change_email(token):
        flash('Your email address has been updated.')
    else:
        flash('Invalid request.')

    return redirect(url_for('main.index'))
예제 #10
0
def change_email(token):
    '''确认邮件视图函数'''
    if current_user.change_email(token):
        flash('邮箱已修改成功')
    else:
        flash('邮箱未修改')
    return redirect(url_for('main.index'))
예제 #11
0
def change_email(token):
    if current_user.change_email(token):
        #这里写在User里的change_email函数会判定email是否符合,符合的话直接
        flash('Your email address has been updated.')
    else:
        flash('Invalid request.')
    return redirect(url_for('main.index'))
예제 #12
0
파일: views.py 프로젝트: yaoice/flask
def change_email(token):
    ''' 验证 更改邮件地址 '''
    if current_user.change_email(token):
        flash(u'您的电子邮件地址已更改')
    else:
        flash(u'链接无效或已过期')
    return redirect(url_for('main.index'))
예제 #13
0
def change_email(token):
    """Change existing user's email with provided token."""
    if current_user.change_email(token):
        flash('Your email address has been updated.', 'success')
    else:
        flash('The confirmation link is invalid or has expired.', 'error')
    return redirect(url_for('main.index'))
예제 #14
0
def change_email(token):
    """Change existing user's email with provided token."""
    if current_user.change_email(token):
        flash('Your email address has been updated.', 'success')
    else:
        flash('The confirmation link is invalid or has expired.', 'error')
    return redirect(url_for('main.index'))
예제 #15
0
def change_email(token):
    ''' tokens set to reset their emails'''
    if current_user.change_email(token):
        flash('Your email address hass been updated')
    else:
        flash('Invalid request')
    return redirect(url_for('main.index'))
예제 #16
0
파일: controller.py 프로젝트: aip/phics
def change_email(token):
    if current_user.change_email(token):
        i18n.flash(change_email, 'successful')
        return redirect(url_for('main.index'))
    else:
        i18n.flash(change_email, 'fail')
    return redirect(url_for('auth.request_to_change_email'))
예제 #17
0
파일: views.py 프로젝트: Smirl/teaflask
def change_email(token):
    """Change email if token is correct."""
    if current_user.change_email(token):
        flash('Your email address has been updated.', 'info')
    else:
        flash('Invalid request.', 'danger')
    return redirect(url_for('main.index'))
예제 #18
0
파일: views.py 프로젝트: Badaben/APIClock
def change_email(token):

    if current_user.change_email(token):
        flash('Your email address has been updated.')
    else:
        flash('Invalid request.')
    return redirect(url_for('main.index'))
예제 #19
0
def change_email(token):
    """ tokens set to reset their emails"""
    if current_user.change_email(token):
        flash("Your email address hass been updated")
    else:
        flash("Invalid request")
    return redirect(url_for("main.index"))
예제 #20
0
def change_email(token):
    """Change existing user's email with provided token."""
    if current_user.change_email(token):
        flash("Your email address has been updated.", "success")
    else:
        flash("The confirmation link is invalid or has expired.", "error")
    return redirect(url_for("main.index"))
예제 #21
0
def change_email(token):
    if current_user.change_email(token):
        syslog.syslog(syslog.LOG_INFO, "User e-mail updated: " + current_user.email)
        flash('Your email address has been updated.', 'success')
    else:
        syslog.syslog(syslog.LOG_ERR, "Email change: Invalid link request: " + current_user.email)
        flash('Invalid request.', 'warning')
    return redirect(url_for('main.index'))
예제 #22
0
def change_email(token):
    if current_user.change_email(token):
        flash('Your email address has been updated.')
        session.clear()
        logout_user()
    else:
        flash('The email confirmation link is either invalid or has expired.')
    return redirect(url_for('login'))
예제 #23
0
파일: views.py 프로젝트: richgieg/flask-now
def change_email(token):
    if current_user.change_email(token):
        session['auth_token'] = current_user.auth_token
        flash_it(AuthMessages.EMAIL_UPDATED)
    else:
        flash_it(AuthMessages.INVALID_CONFIRMATION_LINK)
    return redirect(url_for('main.user',
                            username=current_user.username))
예제 #24
0
def change_email(token):
    if not current_user.change_email(token):
        flash('request failed... please make another email change request again.')
        return redirect(url_for('auth.change_email_request'))
    else:
        flash('Your email account registered with Flasky is successfully changed')
        return redirect(url_for('main.index'))
    return render_template('main/index.html')
예제 #25
0
def change_email(token):
    if current_user.change_email(token):
        flash('Your email address has been updated.')
        g.db.add(current_user)
        g.db.commit()
    else:
        flash('Invalid request.')
    return redirect(url_for('general.index'))
예제 #26
0
def change_email(token):
    if current_user.change_email(token):
        syslog.syslog(syslog.LOG_INFO, "User e-mail updated: " + current_user.email)
        flash('Your email address has been updated.', 'success')
    else:
        syslog.syslog(syslog.LOG_ERR, "Email change: Invalid link request: " + current_user.email)
        flash('Invalid request.', 'warning')
    return redirect(url_for('index'))
예제 #27
0
def change_email(token):
    if current_user.change_email(token):
        flash('Your email address has been updated.')
        g.db.add(current_user)
        g.db.commit()
    else:
        flash('Invalid request.')
    return redirect(url_for('general.index'))
예제 #28
0
def change_email(token):
    """
    args: token.
    Check token and actually refresh your email.
    """
    if not current_user.change_email(token):
        invalid_token()
    flash(u"Your new email has been confirmed.")
    return to_dashboard()
예제 #29
0
파일: views.py 프로젝트: frjurado/flask-rep
def change_email(token):
    """
    args: token.
    Check token and actually refresh your email.
    """
    if not current_user.change_email(token):
        invalid_token()
    flash(u"Your new email has been confirmed.")
    return to_dashboard()
예제 #30
0
파일: views.py 프로젝트: yaoice/flask
def change_email(token):
              ''' 验证 更改邮件地址 '''
              if current_user.change_email(token):
                            flash(u'您的电子邮件地址已更改')
              else:
                            flash(u'链接无效或已过期')
              return redirect(url_for('main.index'))
                            
                                          
              

    
              
예제 #31
0
def change_email():
    form = ChangeEmailForm()
    if form.validate_on_submit():
        if current_user.verify_password(form.password.data):
            if current_user.change_email(form.email.data):
                flash('Your email address has been updated.')
                return redirect(url_for('main.dashboard'))
            else:
                flash('Invalid request.')
                return redirect(url_for('main.dashboard'))
        else:
            flash('Invalid password.')
    return render_template('auth/settings.html', form=form, title='Change Email Address')
예제 #32
0
 def get(self, token):
     if current_user.change_email(token):
         flash('Your email address has been updated.')
     else:
         flash('Invalid request.')
     return redirect(url_for('auth.login'))
예제 #33
0
def change_email(token):
    if current_user.change_email(token):
        flash(u'你的邮箱已更新。')
    else:
        flash(u'非法请求。')
    return redirect(url_for('main.index'))
예제 #34
0
def change_email(token):
    if current_user.change_email(token):
        flash({'success': u'您的账户绑定邮箱已更新成功!'})
    else:
        flash({'error': u'无效的操作请求!'})
    return redirect(url_for('auth.config'))
예제 #35
0
def change_email(token):
    if current_user.change_email(token):
        flash(u'你的邮件地址已更新')
    else:
        flash('Invalid request.')
    return redirect(url_for('main.index'))
예제 #36
0
파일: views.py 프로젝트: yuanniufei/blogs
def change_email(token):
    if current_user.change_email(token):
        flash('邮箱修改成功')
    else:
        flash('邮箱修改失败')
    return redirect(url_for('main.index'))
예제 #37
0
def change_email(token):
	if current_user.change_email(token):
		flash(u'邮箱地址已更改.')
	else:
		flash(u'不合理请求.')
	return redirect(url_for('main.index'))
예제 #38
0
파일: views.py 프로젝트: yyt030/badou.com
def change_email(token):
    if current_user.change_email(token):
        flash(u"邮件地址已修改.")
    else:
        flash(u"无效的请求.")
    return redirect(url_for("main.index"))
예제 #39
0
def change_email(token):
    if current_user.change_email(token):
        flash('您的邮箱已确认')
    else:
        flash('无效请求')
    return redirect(url_for('main.index'))
예제 #40
0
파일: views.py 프로젝트: richlyon/flasky
def change_email(token):
    if current_user.change_email(token):
        flash("Your email address has been updated.")
    else:
        flash("Invalid request.")
    return redirect(url_for("main.index"))
예제 #41
0
def change_email(token):
    if current_user.change_email(token):
        flash('邮箱地址已更新')
    else:
        flash('无效的请求')
    return redirect(url_for('main.index'))
예제 #42
0
def change_email(token):
    if current_user.change_email(token):
        flash('你的电子邮件已更改。')
    else:
        flash('无效的请求。')
    return redirect(url_for('main.index'))
예제 #43
0
def change_email(token):
	if current_user.change_email(token):
		flash(u'您已成功更换邮箱。')
	else:
		flash(u'非法请求')
	return redirect(url_for('main.index'))
예제 #44
0
def change_email(token):
	if current_user.change_email(token):
		flash('你的E-mail地址已更新')
	else:
		flash('无效的请求')
	return redirect(url_for('main.index'))
예제 #45
0
파일: views.py 프로젝트: khalily/myblog
def change_email(token):
    if not current_user.change_email(token):
        flash('Invalidate change email token')
        return redirect(url_for('main.index'))
    flash('Email change successful')
    return redirect(url_for('main.index'))
예제 #46
0
def change_email(token):
    if current_user.change_email(token):
        flash("Your email address has been updated", "success")
    else:
        flash("Invalid request", "danger")
    return redirect(url_for("auth.portal"))
예제 #47
0
def change_email(token):
    if current_user.change_email(token):
        flash('you have change your email.')
    else:
        flash('Invaild request...--')
    return redirect(url_for('main.index'))
예제 #48
0
파일: views.py 프로젝트: StoneHo/blog
def change_email(token):
    if current_user.change_email(token):
        flash(u'你的邮件地址已经更新.')
    else:
        flash(u'修改邮箱地址请求失败.')
    return redirect(url_for('main.index'))
예제 #49
0
def change_email(token):
    if current_user.change_email(token):
        flash('Your email has been changed.')
    else:
        flash('Something went wrong. Please try to change your email again.')
    return redirect(url_for('main.index'))
예제 #50
0
파일: views.py 프로젝트: hellckt/micblog
def change_email(token):
    if current_user.change_email(token):
        flash(u'你的密码已更新。')
    else:
        flash(u'错误的请求。')
    return redirect(url_for('main.index'))
예제 #51
0
파일: views.py 프로젝트: guo-ge/hellowor1d
def change_email(token):
    if current_user.change_email(token):
        flash('您的邮箱已经更新~')
    else:
        flash('非法请求!')
    return redirect(url_for('main.index'))
예제 #52
0
파일: views.py 프로젝트: whytin/whytin-blog
def change_email(token):
    if current_user.change_email(token):
        flash('你的邮箱已重置成功')
    else:
        flash('错误的请求')
    return redirect(url_for('main.index'))
예제 #53
0
def change_email(token):
	if current_user.change_email(token):
		flash('Your email address has been updated.')
	else:
		flash('Invalid request.')
	return render_template('auth/trans.html')
예제 #54
0
def change_email(token):
    if current_user.change_email(token):
        flash('change email succeed!!')
    else:
        flash('the link is invalid or has expired')
    return redirect(url_for('auth.userinfo'))
예제 #55
0
파일: views.py 프로젝트: yelongyu/chihu
def change_email_confirm(token):
    if current_user.change_email(token):
        flash('邮箱地址更新成功!')
    else:
        flash('链接已失效,请重新验证!')
    return redirect(url_for('main.index'))
예제 #56
0
파일: views.py 프로젝트: xinqiu/Flask-Web
def change_email(token):
    if current_user.change_email(token):
        flash('邮箱已更新.'.decode('utf-8'))
    else:
        flash('无效请求.'.decode('utf-8'))
    return redirect('main.index')
예제 #57
0
파일: views.py 프로젝트: doocan/zuixinke
def change_email(token):
    if current_user.change_email(token):
        flash(u'登录邮箱更改成功.')
    else:
        flash('请求无效.')
    return redirect(url_for('main.index'))
예제 #58
0
def change_email(token):
    if current_user.change_email(token):
        flash('你的邮箱地址已经被更新')
    else:
        flash('请求错误')
        return redirect(url_for('main.index'))
예제 #59
0
파일: views.py 프로젝트: shoo-be-doo/flasky
def change_email(token):
    if current_user.change_email(token):
        flash('你的电子邮件地址已更新。')
    else:
        flash('无效请求。')
    return redirect(url_for('main.index'))