 				, 700
 
 			$scope.checkValidation = ->
-				$scope.state.isValid = $scope.state.deleteText == $scope.email and $scope.state.password.length > 0
+				$scope.state.isValid = userDefaultEmail? and $scope.state.deleteText == userDefaultEmail and $scope.state.password.length > 0
 
 			$scope.delete = () ->
 				$scope.state.inflight = true

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

		$scope.unsubscribe = () ->

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

		$scope.upgradeIntegration = (service) ->
