设计注册自动登录用户 [英] devise sign up automatically signs in user

查看:224
本文介绍了设计注册自动登录用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我注册用户,但尚未确认设置(即将在未来,但注释掉现在),它会自动登录用户吗?

when i sign up a user, but don't have confirmable setup just yet (i.e. will be in the future but commented out for now), does it automatically sign in the user?

我需要sign_up只是sign_up的用户,但没有登录,它需要重定向到登录页面,我如何注册不记录用户?

i need sign_up to just sign_up the user, but not sign him in, it needs to redirect to the login page, how do i get sign up to not log the user in?

推荐答案

您需要允许未确认的用户至少访问一天。

You need allow unconfirmed user to access at least one day.

$ c> config / initializers / devise.rb :

In your config/initializers/devise.rb:

config.allow_unconfirmed_access_for = 1.days

这篇关于设计注册自动登录用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆