<commit_before>'use strict';

angular.module('CactusApp.createUser', ['ngRoute'])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/register', {
    templateUrl: 'components/CreateUser/createUser.html',
    controller: 'createUser'
  });
}])

.controller('createUser', function($scope, $location, $rootScope, $firebaseAuth, $firebaseObject, userRef) {

  $scope.createUser = function createUser() {
    var user = $scope.data;
    var username = user.username;
    if (user.password === user.reTypePassword) {
      userRef.createUser({
        email: user.email,
        password: <PASSWORD>
      }, function(error, userData) {
        if (error) {
          console.log("Error creating user:", error);
        } else {
          console.log("Successfully created user account with uid:", userData.uid);
        }
      });
      userRef.push({
        email: user.email,
        username: username,
        tasks: [''],
        group: ['']
      });
    }
		else{
			//trow error on password match
			console.log('passwords dont match');
		}

  }


});<commit_msg>change location path<commit_after>'use strict';

angular.module('CactusApp.createUser', ['ngRoute'])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/register', {
    templateUrl: 'components/CreateUser/createUser.html',
    controller: 'createUser'
  });
}])

.controller('createUser', function($scope, $location, $rootScope, $firebaseAuth, $firebaseObject, userRef) {

  $scope.createUser = function createUser() {
    var user = $scope.data;
    var username = user.username;
    if (user.password === user.reTypePassword) {
      userRef.createUser({
        email: user.email,
        password: <PASSWORD>
      }, function(error, userData) {
        if (error) {
          console.log("Error creating user:", error);
        } else {
          console.log("Successfully created user account with uid:", userData.uid);
        }
      });
      userRef.push({
        email: user.email,
        username: username,
        tasks: [''],
        group: ['']
      });
      $location.path('/creategroup')
    }
		else{
			//trow error on password match
			console.log('passwords dont match');
		}

  }


});
{'fraction_non_alphanumeric': 0.1542933810375671, 'fraction_numerical': 0.0, 'mean_word_length': 2.8304794520547945, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5756674', 'n_tokens_mistral': 676, 'n_tokens_neox': 656, 'n_words': 137}