{"size": 675, "ext": "js", "max_stars_repo_path": "akwire/app/assets/javascripts/users/CreateUserCtrl.js", "max_stars_repo_name": "littlenag/akwire", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "akwire/app/assets/javascripts/users/CreateUserCtrl.js", "max_issues_repo_name": "littlenag/akwire", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "akwire/app/assets/javascripts/users/CreateUserCtrl.js", "max_forks_repo_name": "littlenag/akwire", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.125, "max_line_length": 74, "alphanum_fraction": 0.557037037}
(function() {

  controllersModule.controller('CreateUserCtrl', [
    '$scope', '$log', 'UserService', function($scope, $log, UserService) {
      $log.debug("constructing CreateUserController");

      $scope.user = {};

      $scope.createUser = function() {
        $log.debug("createUser()");
        $scope.user.active = true;
        return UserService.createUser($scope.user).then(function(data) {
          $log.debug("Promise returned " + data + " User");
          $scope.user = data;
          return $location.path("/");
        }, function(error) {
          return $log.error("Unable to create User: " + error);
        });
      };
    }]
  );

}).call(this);
