onboarding: Use delivery_email in "new login" notifications.

Since we implemented EMAIL_ADDRESS_VISIBILITY_ADMINS, the intent is
that `delivery_only` should be used for accessing a user's actual
email address; with `email` used only in the Zulip API where we
haven't migrated to interacting with other users by ID.

This fixes a place we neglected to migrate.
This commit is contained in:
Tim Abbott 2019-11-14 12:18:06 -08:00
parent 428956c086
commit a41a4fcc33
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ def email_on_new_login(sender: Any, user: UserProfile, request: Any, **kwargs: A
user_agent = request.META.get('HTTP_USER_AGENT', "").lower() user_agent = request.META.get('HTTP_USER_AGENT', "").lower()
context = common_context(user) context = common_context(user)
context['user_email'] = user.email context['user_email'] = user.delivery_email
user_tz = user.timezone user_tz = user.timezone
if user_tz == '': if user_tz == '':
user_tz = timezone_get_current_timezone_name() user_tz = timezone_get_current_timezone_name()