You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering a new user and a 403 is returned because there is already one with the same name, they should not be sent to the index page but kept on the register page so they can try again.
Here's a quick solution. Let me know if there's a better one!:
//file: controllers.js//....controller('RegisterCtrl',//...$scope.register=function(){Auth.register({username: $scope.username,password: $scope.password,role: $scope.role},function(){$location.path('/');},function(err){$rootScope.error=err;//If there is an error then stay on the register pageif(err!==null){$location.path('/register');}});};}]);
The text was updated successfully, but these errors were encountered:
Excellent observation! Thank you so much.
I'd be happy to receive a PR for this since you've already solved it. If it's too much bother, let me know and I will make the changes myself :)
When registering a new user and a 403 is returned because there is already one with the same name, they should not be sent to the index page but kept on the register page so they can try again.
Here's a quick solution. Let me know if there's a better one!:
The text was updated successfully, but these errors were encountered: