-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #385 from KSG-IT/feature/add-single-user-endpoint
feat(users): add invite new user mutation
- Loading branch information
Showing
2 changed files
with
72 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from django.conf import settings | ||
|
||
|
||
def welcome_single_user_email(user_email, jwt_token): | ||
from common.util import send_email | ||
|
||
content = f""" | ||
Hei! | ||
Velkommen til KSG! Første gang du logger inn må du sette et passord. | ||
For å sette passordet ditt, trykk på lenken under: | ||
{settings.APP_URL}/reset-password?token={jwt_token} | ||
""" | ||
|
||
html_content = f""" | ||
Hei! | ||
<br> | ||
<br> | ||
Velkommen til KSG! Første gang du logger inn må du sette et passord. | ||
<br> | ||
<br> | ||
<span>{settings.APP_URL}/reset-password?token={jwt_token}</span> | ||
""" | ||
subject = "Velkommen til KSG!" | ||
send_email( | ||
subject=subject, | ||
message=content, | ||
html_message=html_content, | ||
recipients=[user_email], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters