This commit is contained in:
Joseph Schorr 2014-09-08 12:00:20 -04:00
parent 64480fd4ed
commit 9eccdb7696

View file

@ -1647,14 +1647,17 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
if ($scope.cuser.logins) {
for (var i = 0; i < $scope.cuser.logins.length; i++) {
if ($scope.cuser.logins[i].service == 'github') {
var login = $scope.cuser.logins[i];
login.metadata = login.metadata || {};
if (login.service == 'github') {
$scope.hasGithubLogin = true;
$scope.githubLogin = $scope.cuser.logins[i].metadata['service_username'];
$scope.githubLogin = login.metadata['service_username'];
}
if ($scope.cuser.logins[i].service == 'google') {
if (login.service == 'google') {
$scope.hasGoogleLogin = true;
$scope.googleLogin = $scope.cuser.logins[i].metadata['service_username'];
$scope.googleLogin = login.metadata['service_username'];
}
}
}