 		$scope.deleteAccount = () ->
 			modalInstance = $modal.open(
 				templateUrl: "deleteAccountModalTemplate"
-				controller: "DeleteAccountModalController",
-				scope: $scope
+				controller: "DeleteAccountModalController"
+				resolve:
+					userDefaultEmail: () ->
+						UserAffiliationsDataService
+							.getUserEmails()
+							.then (userEmails) ->
+								defaultEmailDetails = _.find userEmails, (userEmail) -> userEmail.default
+								return defaultEmailDetails?.email or null
+							.catch () -> null
 			)
 
 		$scope.upgradeIntegration = (service) ->

define [
	"base"
], (App) ->
	App.controller "AccountSettingsController", ["$scope", "$http", "$modal", "event_tracking", ($scope, $http, $modal, event_tracking) ->
		$scope.subscribed = true

		$scope.unsubscribe = () ->

	]

	App.controller "DeleteAccountModalController", [
		"$scope", "$modalInstance", "$timeout", "$http", "userDefaultEmail",
		($scope,   $modalInstance,   $timeout,   $http,   userDefaultEmail) ->
			$scope.state =
				isValid : false
				deleteText: ""
