示例#1
0
def resend_confirmation(json):
    current_user.generate_confirmation_token().save()
    SendEmail().send_email(subject='Confirm Your Account',
                           html=render_template('auth/email/resend_confirmation.html', user=current_user),
                           send_to=(current_user.profireader_email, ))
    flash('A new confirmation email has been sent to you by email.')
    return True
示例#2
0
def resend_confirmation(json):
    current_user.generate_confirmation_token().save()
    SendEmail().send_email(subject='Confirm Your Account',
                           html=render_template('auth/email/resend_confirmation.html', user=current_user),
                           send_to=(current_user.profireader_email, ))
    flash('A new confirmation email has been sent to you by email.')
    return True
示例#3
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(app=current_app,
              to=current_user.email,
              subject='Please confirm your account',
              template='register',
              username=current_user.username,
              confirm_url='http://10.35.89.23/auth/confirm/' +
              current_user.generate_confirmation_token())
    flash('A new confirmation mail has been sent to your email box!')
    return redirect(url_for('main.index'))
示例#4
0
文件: views.py 项目: gbjuno/flask-web
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(
        app=current_app,
        to=current_user.email,
        subject="Please confirm your account",
        template="register",
        username=current_user.username,
        confirm_url="http://10.35.89.23/auth/confirm/" + current_user.generate_confirmation_token(),
    )
    flash("A new confirmation mail has been sent to your email box!")
    return redirect(url_for("main.index"))
示例#5
0
def resend_confirmation():

	user = User.query.filter_by(id=session['user_id']).first()
	token = current_user.generate_confirmation_token()
	send_email('confirm','Confirm Your Account','confirm',user=user, token=token)
	flash('A new confirmation email has been sent to you by email.')
	return "send a  msg"											#redirect(url_for('index'))
示例#6
0
def resend_confirmation():
	token = current_user.generate_confirmation_token()
	send_email(current_user.email, 'Confirmed Your Account', 
			'auth/confirm', current_user=current_user, token=token)
	flash('A  new confirmation email has been send to your mailbox')
#	return redirect(url_for('main.index'))
	return render_template('index.html') 
示例#7
0
def service_resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account', 'auth/email/confirm_service', 
               user = current_user, token = token)
    data = {'message' : 'A new confirmation email has been sent to you by email.',
            'success': True }
    return jsonify(data)
示例#8
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email, 'Confirm Your Account',
              'auth/email/confirm',
              user=current_user, token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
示例#9
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(
        current_user.email, 'Confirm Your Account',
        '/auth/email/confirm', user=current_user, token=token)
    flash('A new confirmation email has been sent.')
    return redirect(url_for('main.index'))
示例#10
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    # send_email(user.email, 'Confirm Your Account', 'auth/email/confirm', user = current_user , token = token)  # NameError: name 'user' is not defined
    flash('A new confirmation email has been sent to you by email.')
    flash(url_for('auth.confirm', token = token, _external=True))
    # <a href ="{{ url_for('auth.confirm', token = token, _external=True) }}">验证链接</a>
    return redirect(url_for('main.index'))
示例#11
0
文件: front.py 项目: finron/finepy
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    # send_email(current_user.email, u'确认邮件',
    send_email(current_user.email, u'确认邮件',
               'auth/email/confirm', user=current_user, token=token)
    flash(u'新的确认邮件已发送到你邮箱')
    return redirect(url_for('.index'))
示例#12
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,'账号认证',
               'auth/email/confirm',
               user=current_user,token=token)
    flash('新的认证邮件已发送') 
    return redirect(url_for('main.index'))
示例#13
0
def resend_confirmation():
    user = current_user
    token = current_user.generate_confirmation_token()
    send_email(user.email, 'Confirm your account',
               'auth/email/confirm', user = user, token = token)
    flash('We\'ve sent you a new confirmation email.')
    return redirect(url_for('main.root'))
示例#14
0
文件: views.py 项目: tubage8/MyBlog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, "Confirm Your Account", "auth/email/confirm", user=current_user, token=token)
    ###test###
    print "###confirm_test###" + url_for("auth.confirm", token=token, _external=True)
    ###test###
    flash("A new confirmation email has been sent to you by email")
    return redirect(url_for("main.index"))
示例#15
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email has been sent to you by email.')
示例#16
0
文件: views.py 项目: brantonb/cbbpoll
def retry_confirm():
    if current_user.emailConfirmed:
        flash('Your email address has been confirmed.', 'success')
        return redirect(url_for('index'))
    token = current_user.generate_confirmation_token()
    message.send_email('Confirm Your Account', [current_user], 'confirmation', token=token)
    flash('A new confirmation email has been sent to you. Please check your spam or junk folder.', 'info')
    return redirect(url_for('index'))
示例#17
0
文件: views.py 项目: khalily/myblog
def resend_confirmation():
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'confirm', 'email/confirm',
               token=token, user=current_user)
    flash('a new conformation email send to your email')
    return redirect(url_for('main.index'))
def change_email():
    form = ChangeEmailForm()
    if form.validate_on_submit():
        token = current_user.generate_confirmation_token()
        send_mail(form.email.data, 'Change email address', 'mail/change_email_mail', user = current_user, token = token, email = form.email.data)
        flash('Mail to confirm has been send in your new address')
        return redirect(url_for('index'))
    return render_template('auth/change_email.html', form = form)
示例#19
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    # send_email(current_user.email, "Confirm your email", "email/confirm", 
    #         user=current_user, token=token)
    send_async_email(current_user.email, "Confirm your email", "email/confirm", 
        user=current_user, token=token)
    flash("A new confirmation email has already been sent to your email.")
    return redirect(url_for("index"))
示例#20
0
def resend_confirmation():
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account',
               'auth/email/confirm', user=current_user, token=token)
    flash_it(AuthMessages.CONFIRM_ACCOUNT)
    return redirect(url_for('main.index'))
示例#21
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email,
              'confirm your account',
              'auth/email/confirm',
              user=current_user,
              token=token)
    flash('A new confirmation link is in valid or has expired.')
    return redirect(url_for('main.index'))
示例#22
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               gettext('Confirm Your Account'),
               'auth/email/en/confirm',
               user=current_user,
               token=token)
    flash(gettext('A new confirmation email has been sent to you by email.'), 'success')
    return redirect(url_for('auth.login'))
示例#23
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'confirm',
               user=current_user,
               token=token)
    flash('新的确认电子邮件已经通过邮件发送给您。')
    return redirect(url_for('blog.index'))
示例#24
0
def resend_confirm():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(messages.confirm_resend)
    return redirect(url_for('main.index'))
示例#25
0
def resend_confirmation():
	token = current_user.generate_confirmation_token()
	user = current_user
	print('confirm route')
	response = send_mandrill_email(template='auth/email/confirm', to=[user.email], subject='Confirm Your Account', user=user, token=token)
	print(response)
	#send_email(current_user.email, 'Confirm Your Account', 'auth/email/confirm', user=current_user, token=token)
	flash('A new confirmation email has been sent to you.')
	return redirect(url_for('main.index'))
示例#26
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user,
               u'AWoter注册确认',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'一封新的确认邮件已发送,请查收!')
    return redirect(url_for('main.index'))
示例#27
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'confirm your account',
               'mail/confirm',
               token=token,
               user=current_user)
    flash('an new email has been sent to you by email')
    return redirect(url_for('main.index'))
示例#28
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email,
              '激活邮件',
              'auth/email/confirm',
              user=current_user,
              token=token)
    flash('激活邮件已重新发送')
    return redirect(url_for('main.index'))
示例#29
0
def resend_confirmation():  #重新发送验证邮件
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '验证你的邮箱',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封验证邮件已发往你的邮箱')
    return redirect(url_for('main.index'))
示例#30
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'验证你的账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'新的验证邮件已发送至你的邮箱')
    return redirect(url_for('main.index'))
示例#31
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('新的确认邮件已经发送到你的邮箱.')
    return redirect(url_for('main.index'))
示例#32
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'请再次激活您的邮箱!',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'又一封激活账号的邮件已经发送至您的邮箱!')
    return redirect(url_for('main.index'))
示例#33
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '请确认你的帐号',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('已重新向你的邮箱发出确认邮件,请在一小时内确认')
    return redirect(url_for('main.index'))
示例#34
0
文件: views.py 项目: onelove1991/fach
def resend_confirmation():
    if current_user.confirmed:
        flash("Your are already confirmed!")
        return redirect(url_for("main.index"))
    else:
        token = current_user.generate_confirmation_token()
        send_email(current_user.email, "Confirm Your Account", "auth/email/confirm", user=current_user, token=token)
        flash("A new confirmation email has been send to your email.")
        return redirect(url_for("main.index"))
def confirm_request():
    """Respond to new user's request to confirm their account."""
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account',
               'account/email/confirm', user=current_user, token=token)
    flash('A new confirmation link has been sent to {}.'.
          format(current_user.email),
          'warning')
    return redirect(url_for('main.index'))
示例#36
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Подтвердите ваш email',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('Новое сообщение отправлено вам')
    return redirect(url_for('main.index'))
示例#37
0
文件: views.py 项目: dawedawe/traipor
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email will be send to you.')
    return redirect(url_for('main.index'))
示例#38
0
def resend_confirmation():
    if not current_user.confirmed:
        token = current_user.generate_confirmation_token()
        send_email(current_user.email,
                   u'激活账号',
                   'auth/email/confirm',
                   user=current_user,
                   token=token)
        flash(u'注册成功,一封邮件已经发到您邮箱,请前往邮箱激活')
示例#39
0
文件: views.py 项目: doocan/zuixinke
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'确认帐户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'一封新的确认邮件已发送至您的邮箱,请在一小时内完成确认!')
    return redirect(url_for('main.index'))
示例#40
0
文件: views.py 项目: bsh2/traipor
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email will be send to you.')
    return redirect(url_for('main.index'))
示例#41
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Email',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('We have sent a new confirmation email')
    return redirect(url_for('main.index'))
示例#42
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'帐号确认邮件',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'一封新的确认邮件已发至你邮箱。')
    return redirect(url_for('main.index'))
示例#43
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    SendEmail().send_email(subject='Confirm Your Account',
                           template='auth/email/confirm',
                           send_to=(current_user.profireader_email, ),
                           user=current_user,
                           token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('general.index'))
示例#44
0
文件: views.py 项目: yaoice/flask
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'确认您的帐户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'一个新的确认邮件,已经发送到您邮箱.')
    return redirect(url_for('main.index'))
示例#45
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '确认你的账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封新的确认邮件已发送到您的邮箱.')
    return redirect(url_for('main.index'))
示例#46
0
def resend_confirmation():
    '''在用户未激活且以登陆的情况下重新发送确认邮件'''
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '请确认你的账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封新的确认邮件已经发送到了你的邮箱')
    return redirect(url_for('main.index'))
示例#47
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    user = UserModel.query.filter_by(email=current_user.email).first()
    send_email.delay(user.email,
                     'Confirm Your Account',
                     'auth/email/confirm',
                     user=user,
                     token=token)
    flash('A new confirmation email has been sent to you by email')
    return redirect(url_for('index.index'))
示例#48
0
def resend_confirmation():
    # pydevd.settrace('192.168.56.1', port=22, stdoutToServer=True, stderrToServer=True)
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
示例#49
0
def resend_confirmation():
    user = User.query.filter_by(id=current_user.id).first()
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'auth/email/confirm',
               user=user,
               token=token)
    flash('Новая ссылка на активацию акаунта отпправлена на почту.')
    return redirect(url_for('main.index'))
示例#50
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'CVE-PORTAL -- Account Confirmation',
               '/emails/confirm',
               user=current_user,
               token=token)
    syslog.syslog(syslog.LOG_WARNING, "User Resend a Confirmation Email to: " + current_user.email)
    flash('A new confirmation email has been sent to you by email.', 'info')
    return redirect(url_for('main.index'))
示例#51
0
文件: views.py 项目: LianYun/xing
def resend_confirmation():
    """
    用于重新发送确认邮件的路由。
    会在异步发送邮件后重定向到首页。
    """
    token = current_user.generate_confirmation_token()
    send_async_email(current_user.email, 'Confirm Your Account',
               'auth/email/confirm', user=current_user, token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
示例#52
0
def resend_confirmation():
#这是由未认证页面连接的页面,以防之前的邮件丢失,请求再次发送邮件
	token = current_user.generate_confirmation_token()
	#将当前用户的SECRET_KEY生成加密令牌
	send_email(current_user.email, 'Confirm Your Account',
				'auth/email/confirm', user = current_user, token = token)
	#发送邮件给当前用户的邮箱
	flash('A confirmation email has been sent to you by email.')
	#弹出消息
	return redirect(url_for('main.index'))
示例#53
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'CVE-PORTAL -- Account Confirmation',
               '/emails/confirm',
               user=current_user,
               token=token)
    syslog.syslog(syslog.LOG_WARNING, "User Resend a Confirmation Email to: " + current_user.email)
    flash('A new confirmation email has been sent to you by email.', 'info')
    return redirect(url_for('index'))
示例#54
0
文件: views.py 项目: Toruitas/tomt
def resend_confirmation():
    """
    Need Captcha
    :return:
    """
    token = current_user.generate_confirmation_token()
    send_grid_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm', user=current_user, token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
示例#55
0
def resend_confirmation():
    """
    Get a new confirmation token (if expired or if mail was lost).
    """
    if current_user.confirmed:
        flash(u"Your account is already confirmed.")
        return next_or_index()
    token = current_user.generate_confirmation_token()
    email.confirm(current_user, token)
    flash(u"A new confirmation link has been sent to you. Please check email.")
    return to_dashboard()
示例#56
0
def renew_email():
    form = Renewmail()
    head = 'Renew mail'
    if form.validate_on_submit():
        new_email = form.new_email.data
        session['new_email'] = new_email
        token = current_user.generate_confirmation_token(new_email=new_email)
        send_email(new_email, 'Confirm Your new email', 'auth/confirmmail', user=current_user, token=token)
        flash('A confirmation email has been sent to you by email.')
        return redirect(url_for('main.index'))
    return render_template('auth/renew.html', form=form, head=head)
示例#57
0
def confirmresend():
    # print current_user
    # # <User u'chao'>
    token = current_user.generate_confirmation_token()
    # print token
    # print current_user.email
    # [email protected]
    # print current_user
    send_email(current_user.email, 'Confirm Your Account', 'auth/email/confirm', user=current_user, token=token)
    flash('A confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
示例#58
0
 def get(self):
     token = current_user.generate_confirmation_token()
     send_email.delay(
         current_user.email,
         'Confirm Your Account',
         'auth/email/confirm',
         user=current_user,
         token=token
     )
     flash('A new confirmation email has been sent to you by email')
     return redirect(url_for('index.index'))
示例#59
0
文件: views.py 项目: wzkacxl/Flask
def resend_confirmation():
	token = current_user.generate_confirmation_token()
	send_email(current_user.email, 'Confirm Your Account',
				'auth/email/confirm', user=current_user,token=token)
	flash('A new confirmation email has been sent to you by email.')
	return redirect(url_for('main.index'))

#@app.route('/secret')
#@login_required
#def secret():
#	return 'Only authenticated users are allowed!'
示例#60
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(
        current_user.email,
        "Confirm Your Account",
        "auth/email/confirm",
        user=current_user,
        token=token
    )
    flash("A new confirmation email has been sent to you by email.")
    return redirect(url_for("main.index"))