mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-07 16:51:34 +02:00
feat(users): use displayName alternative first name and last name
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
vm.user.lastName = '';
|
||||
var user = vm.user;
|
||||
|
||||
user.$update(function () {
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
Notification.error({message: $location.search().err});
|
||||
}
|
||||
|
||||
// If user is signed in then redirect back home
|
||||
if (vm.authentication.user && !vm.activeMethod) {
|
||||
$location.path('/');
|
||||
}
|
||||
|
||||
/**
|
||||
* account active successfully, redirect to home after 2 seconds
|
||||
*/
|
||||
@@ -72,6 +77,7 @@
|
||||
vm.credentials.inviteToken = $stateParams.token;
|
||||
}
|
||||
|
||||
vm.credentials.lastName = '';
|
||||
UsersService.userSignup(vm.credentials)
|
||||
.then(onUserSignupSuccess)
|
||||
.catch(onUserSignupError);
|
||||
@@ -109,7 +115,7 @@
|
||||
vm.authentication.user = response;
|
||||
$rootScope.$broadcast('auth-user-changed');
|
||||
$rootScope.$broadcast('user-invitations-changed');
|
||||
Notification.info({message: 'Welcome ' + response.firstName});
|
||||
Notification.info({message: 'Welcome ' + response.displayName});
|
||||
// And redirect to the previous or home page
|
||||
$state.go($state.previous.state.name || 'home', $state.previous.params);
|
||||
}
|
||||
|
||||
@@ -22,15 +22,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
vm.user.lastName = '';
|
||||
var user = new UsersService(vm.user);
|
||||
|
||||
user.$update(function (response) {
|
||||
$scope.$broadcast('show-errors-reset', 'vm.userForm');
|
||||
|
||||
Notification.success({ message: '<i class="glyphicon glyphicon-ok"></i> Edit profile successful!' });
|
||||
Notification.success({message: '<i class="glyphicon glyphicon-ok"></i> Edit profile successful!'});
|
||||
Authentication.user = response;
|
||||
}, function (response) {
|
||||
Notification.error({ message: response.data.message, title: '<i class="glyphicon glyphicon-remove"></i> Edit profile failed!' });
|
||||
Notification.error({message: response.data.message, title: '<i class="glyphicon glyphicon-remove"></i> Edit profile failed!'});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user