<commit_before>function UserRegisterCtrl(
  $scope, $state, UserService, CurrentUserService,
) {
  var vm = this;

  vm.register = register;

  function register(user) {
    UserService.register(user).then(function(result) {
      CurrentUserService.login(user).then(function(result) {
        $state.go('home');
      });
      console.log(result);
      console.log('user created');
    });
  };

}

angular
  .module('portal.users')<commit_msg>Fix redirect issue when registering<commit_after>function UserRegisterCtrl(
  $scope, $state, UserService, CurrentUserService,
) {
  var vm = this;

  vm.register = register;

  function register(user) {
    UserService.register(user).then(function(result) {
      CurrentUserService.login(user).then(function(result) {
        $state.go('home.welcome');
      });
      console.log(result);
      console.log('user created');
    });
  };

}

angular
  .module('portal.users')
{'fraction_non_alphanumeric': 0.14826839826839827, 'fraction_numerical': 0.0, 'mean_word_length': 3.625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3686069', 'n_tokens_mistral': 287, 'n_tokens_neox': 283, 'n_words': 45}