flatten user object references throughout controllers and views

This commit is contained in:
Quincy Larson
2015-06-04 12:54:41 -07:00
parent db37482c59
commit b2aafd89e7
11 changed files with 128 additions and 128 deletions

View File

@@ -363,11 +363,11 @@ profileValidation.controller('profileValidationController', ['$scope', '$http',
function($scope, $http) {
$http.get('/account/api').success(function(data) {
$scope.user = data.user;
$scope.user.profile.username = $scope.user.profile.username ? $scope.user.profile.username.toLowerCase() : undefined;
$scope.storedUsername = data.user.profile.username;
$scope.user.username = $scope.user.username ? $scope.user.username.toLowerCase() : undefined;
$scope.storedUsername = data.user.username;
$scope.storedEmail = data.user.email;
$scope.user.email = $scope.user.email ? $scope.user.email.toLowerCase() : undefined;
$scope.user.profile.twitterHandle = $scope.user.profile.twitterHandle ? $scope.user.profile.twitterHandle.toLowerCase() : undefined;
$scope.user.twitterHandle = $scope.user.twitterHandle ? $scope.user.twitterHandle.toLowerCase() : undefined;
$scope.asyncComplete = true;
});
}