[Update] 修改只有local用户需要发送创建成功邮件、发送密码过期邮件;

This commit is contained in:
Bai
2020-03-13 12:33:09 +08:00
parent e38b113d7e
commit 04945809a5
3 changed files with 10 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ def on_user_create(sender, user=None, **kwargs):
logger.debug("Receive user `{}` create signal".format(user.name))
from .utils import send_user_created_mail
logger.info(" - Sending welcome mail ...".format(user.name))
if user.email:
if user.can_send_created_mail():
send_user_created_mail(user)