Add a common base email template, translate the emails over to using jinja and add emails when e-mail addresses and passwords are changed.
This commit is contained in:
parent
64480fd4ed
commit
3c20402b32
12 changed files with 258 additions and 89 deletions
|
@ -19,7 +19,7 @@ from auth.permissions import (AdministerOrganizationPermission, CreateRepository
|
|||
from auth.auth_context import get_authenticated_user
|
||||
from auth import scopes
|
||||
from util.gravatar import compute_hash
|
||||
from util.useremails import (send_confirmation_email, send_recovery_email, send_change_email)
|
||||
from util.useremails import (send_confirmation_email, send_recovery_email, send_change_email, send_password_changed)
|
||||
|
||||
import features
|
||||
|
||||
|
@ -165,6 +165,7 @@ class User(ApiResource):
|
|||
logger.debug('Changing password for user: %s', user.username)
|
||||
log_action('account_change_password', user.username)
|
||||
model.change_password(user, user_data['password'])
|
||||
send_password_changed(user.username, user.email)
|
||||
|
||||
if 'invoice_email' in user_data:
|
||||
logger.debug('Changing invoice_email for user: %s', user.username)
|
||||
|
|
Reference in a new issue