Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Remove unused scope declarations.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhutchison committed Jul 9, 2015
1 parent c2bcfa3 commit 9e19493
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions modules/users/client/controllers/settings.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,6 @@ angular.module('users').controller('SettingsController', ['$scope', '$http', '$l
// If user is not signed in then redirect back home
if (!$scope.user) $location.path('/');

// Check if there are additional accounts
$scope.hasConnectedAdditionalSocialAccounts = function(provider) {
for (var i in $scope.user.additionalProvidersData) {
return true;
}

return false;
};

// Check if provider is already in use with current user
$scope.isConnectedSocialAccount = function(provider) {
return $scope.user.provider === provider || ($scope.user.additionalProvidersData && $scope.user.additionalProvidersData[provider]);
};

// Remove a user social account
$scope.removeUserSocialAccount = function(provider) {
$scope.success = $scope.error = null;

$http.delete('/api/users/accounts', {
params: {
provider: provider
}
}).success(function(response) {
// If successful show success message and clear form
$scope.success = true;
$scope.user = Authentication.user = response;
}).error(function(response) {
$scope.error = response.message;
});
};

// Update a user profile
$scope.updateUserProfile = function(isValid) {
if (isValid){
Expand All @@ -54,18 +23,5 @@ angular.module('users').controller('SettingsController', ['$scope', '$http', '$l
$scope.submitted = true;
}
};

// Change user password
$scope.changeUserPassword = function() {
$scope.success = $scope.error = null;

$http.post('/api/users/password', $scope.passwordDetails).success(function(response) {
// If successful show success message and clear form
$scope.success = true;
$scope.passwordDetails = null;
}).error(function(response) {
$scope.error = response.message;
});
};
}
]);

0 comments on commit 9e19493

Please sign in to comment.