active and verify users

This commit is contained in:
Diego Calvo
2021-03-25 15:16:31 +01:00
parent 190f14f44d
commit 75751f9c89
2 changed files with 2 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ def activate_user(request, uidb64, token):
if user is not None and utils.account_activation_token.check_token(user, token):
# activate user
user.is_active = True
user.email_verified = True
user.save()
if settings.ACTIVATION_REDIRECT:
return redirect(settings.ACTIVATION_REDIRECT)

View File

@@ -250,6 +250,7 @@ def product_loader(csv_reader, user, company=None):
'tags': row['tags'],
'category': row['categoria'],
'identifiers': row['identificadores'],
'active': True,
'history': history,
'creator': user,
# 'valid': True