@@ -7,37 +7,6 @@ angular.module('users').controller('SettingsController', ['$scope', '$http', '$l
7
7
// If user is not signed in then redirect back home
8
8
if ( ! $scope . user ) $location . path ( '/' ) ;
9
9
10
- // Check if there are additional accounts
11
- $scope . hasConnectedAdditionalSocialAccounts = function ( provider ) {
12
- for ( var i in $scope . user . additionalProvidersData ) {
13
- return true ;
14
- }
15
-
16
- return false ;
17
- } ;
18
-
19
- // Check if provider is already in use with current user
20
- $scope . isConnectedSocialAccount = function ( provider ) {
21
- return $scope . user . provider === provider || ( $scope . user . additionalProvidersData && $scope . user . additionalProvidersData [ provider ] ) ;
22
- } ;
23
-
24
- // Remove a user social account
25
- $scope . removeUserSocialAccount = function ( provider ) {
26
- $scope . success = $scope . error = null ;
27
-
28
- $http . delete ( '/api/users/accounts' , {
29
- params : {
30
- provider : provider
31
- }
32
- } ) . success ( function ( response ) {
33
- // If successful show success message and clear form
34
- $scope . success = true ;
35
- $scope . user = Authentication . user = response ;
36
- } ) . error ( function ( response ) {
37
- $scope . error = response . message ;
38
- } ) ;
39
- } ;
40
-
41
10
// Update a user profile
42
11
$scope . updateUserProfile = function ( isValid ) {
43
12
if ( isValid ) {
@@ -54,18 +23,5 @@ angular.module('users').controller('SettingsController', ['$scope', '$http', '$l
54
23
$scope . submitted = true ;
55
24
}
56
25
} ;
57
-
58
- // Change user password
59
- $scope . changeUserPassword = function ( ) {
60
- $scope . success = $scope . error = null ;
61
-
62
- $http . post ( '/api/users/password' , $scope . passwordDetails ) . success ( function ( response ) {
63
- // If successful show success message and clear form
64
- $scope . success = true ;
65
- $scope . passwordDetails = null ;
66
- } ) . error ( function ( response ) {
67
- $scope . error = response . message ;
68
- } ) ;
69
- } ;
70
26
}
71
27
] ) ;
0 commit comments