diff --git a/html/ops/delete_spammers.php b/html/ops/delete_spammers.php index e2beb3c059..f62afad609 100755 --- a/html/ops/delete_spammers.php +++ b/html/ops/delete_spammers.php @@ -80,14 +80,13 @@ // delete users with ID N to M inclusive // // --teams -// delete teams (and their owners) where the team -// - has 0 or 1 members +// delete teams (and their owners and members) where the team // - has no total credit // - has description containing a link, or a URL // - is not a BOINC-Wide team -// and the owner -// - has no posts -// - has no hosts +// and the owner and members +// - have no posts +// - have no hosts error_reporting(E_ALL); ini_set('display_errors', true); diff --git a/html/user/team_create_action.php b/html/user/team_create_action.php index 3d6a2e868b..30e9e1bbd1 100644 --- a/html/user/team_create_action.php +++ b/html/user/team_create_action.php @@ -31,6 +31,12 @@ check_get_args(array()); $user = get_logged_in_user(); +if (@constant('TEAM_CREATE_NEED_CREDIT')) { + if ($user->total_credit == 0) { + error_page("You must complete a task to create a team"); + } +} + if ($recaptcha_private_key) { if (!boinc_recaptcha_isValidated($recaptcha_private_key)) { error_page( diff --git a/html/user/team_create_form.php b/html/user/team_create_form.php index 6ba4b3b335..57bf671588 100644 --- a/html/user/team_create_form.php +++ b/html/user/team_create_form.php @@ -27,6 +27,12 @@ check_get_args(array()); $user = get_logged_in_user(); +if (@constant('TEAM_CREATE_NEED_CREDIT')) { + if ($user->total_credit == 0) { + error_page("You must complete a task to create a team"); + } +} + page_head( tra("Create a team"), null, null, null, boinc_recaptcha_get_head_extra() );