templates_usersdir = $(templatesdir)/users
+dist_templates_users_messages_DATA = \
+ src/templates/users/messages/welcome.txt
+
+templates_users_messagesdir = $(templates_usersdir)/messages
+
dist_templates_users_modules_DATA = \
src/templates/users/modules/list.html
tests/build.py \
tests/builder.py \
tests/distro.py \
+ tests/message.py \
tests/package.py \
tests/repo.py \
tests/upload.py
return res.count
- def create(self, name, realname=None):
+ def create(self, name, realname=None, notify=True):
# XXX check if username has the correct name
# Check if name is already taken
log.debug("Created user %s" % user.name)
+ # Send a welcome email
+ if notify:
+ user._send_welcome_email()
+
return user
def create_from_ldap(self, name):
**kwargs,
)
+ def _send_welcome_email(self):
+ """
+ Sends a welcome email to the user
+ """
+ self.send_email("users/messages/welcome.txt")
+
def is_admin(self):
return self.data.admin is True
--- /dev/null
+To: {{ recipient.email_to }}
+Subject: {{ _("Welcome!") }}
+
+{{ _("Hello, %s!") % recipient }}
+
+{{ _("You have successfully created an account on the Pakfire Build Service.") }}
+
+{# XXX We should add some useful information here with links to documentation, and so on... #}