From 979f27d00035c06123a0f2c36b69e758cd2e86bd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 27 Apr 2009 03:53:47 +0000 Subject: [PATCH] - team import: error out if account creation disabled svn path=/trunk/boinc/; revision=17880 --- checkin_notes | 6 ++++++ html/ops/team_import.php | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 574b5f7ee5..c4f56671d3 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4181,3 +4181,9 @@ David 24 Apr 2009 lib/ coproc.cpp + +David 26 Apr 2009 + - team import: error out if account creation disabled + + html/ops/ + team_import.php diff --git a/html/ops/team_import.php b/html/ops/team_import.php index f9f65150d5..cbd9732d65 100755 --- a/html/ops/team_import.php +++ b/html/ops/team_import.php @@ -26,11 +26,17 @@ require_once("../inc/team.inc"); require_once("../inc/email.inc"); require_once("../inc/project.inc"); -if(defined('INVITE_CODES')) { +if (defined('INVITE_CODES')) { echo "Account creation is protected by invitation codes, so not importing teams'; exit; } +$config = get_config(); +if (parse_bool($config, "disable_account_creation")) { + echo "Account creation is disabled"; + exit; +} + // set the following to 1 to print queries but not do anything $dry_run = 0;