更改django-allauth电子邮件验证行为 [英] Change django-allauth email verification behaivior

查看:118
本文介绍了更改django-allauth电子邮件验证行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Django内置了用户模型 is_active 字段。我假设django-allauth在成功通过电子邮件验证后将此字段设置为True。

Django has builtin User model is_active field. I assume that django-allauth sets this field to True after successful e-mail verification.

我将手动启用用户并将此字段更改为 true。通过Django管理界面代替。
是否可以从django-allauth更改此行为?

I would manually enable the user and change this field to "true" via the Django admin interface instead. Is it possible to change this behavior from django-allauth?

推荐答案

is_active 用于确定其是否为活动帐户,可以将其翻转为 False 而不是删除帐户。但是我认为all-auth不会使用此值做任何事情,当您创建 User True c>对象。

is_active is, like you mentioned, used to determine whether its an active account, and can be flipped to False instead of deleting the acccount. But I don't think all-auth does anything with this value, it is automatically set to True when you create a User object.

您要查找的内容位于单独的表中,通常为 email_addresses。这将显示已验证哪些电子邮件地址。

What you are looking for is in a separate table, usually "email_addresses". This will show which email addresses have been verified.

这篇关于更改django-allauth电子邮件验证行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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