mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
1 parent
74d0eb729c
commit
e207606686
1 file changed
+5
-3
@@ -451,12 +451,14 @@ class UserCreateSerializer(ExendedUserSerializer):
|
|||||||
# Make sure the user cannot login until they have set a password
|
# Make sure the user cannot login until they have set a password
|
||||||
instance.set_unusable_password()
|
instance.set_unusable_password()
|
||||||
|
|
||||||
message = _(
|
message = (
|
||||||
'Your account has been created.\n\nPlease use the password reset function to login'
|
_('Your account has been created.')
|
||||||
|
+ '\n\n'
|
||||||
|
+ _('Please use the password reset function to login')
|
||||||
)
|
)
|
||||||
|
|
||||||
if base_url:
|
if base_url:
|
||||||
message += f'\nURL: {base_url}'
|
message += f'\n\nURL: {base_url}'
|
||||||
|
|
||||||
# Send the user an onboarding email (from current site)
|
# Send the user an onboarding email (from current site)
|
||||||
instance.email_user(subject=_('Welcome to InvenTree'), message=message)
|
instance.email_user(subject=_('Welcome to InvenTree'), message=message)
|
||||||
|
|||||||
Reference in new issue
Block a user