From 6aebbdb213dbf1dea4db58fd1d02b2cb0062e094 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 9 Apr 2017 00:37:27 -0700 Subject: [PATCH] Web: make TEAM_CREATE_NEED_CREDIT work for team-create RPC too --- html/user/create_team.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/user/create_team.php b/html/user/create_team.php index d7be56c5e9..ca31dea09b 100644 --- a/html/user/create_team.php +++ b/html/user/create_team.php @@ -42,6 +42,12 @@ if (!$user) { xml_error(ERR_DB_NOT_FOUND); } +if (@constant('TEAM_CREATE_NEED_CREDIT')) { + if ($user->total_credit == 0) { + xml_error(-1, "no credit"); + } +} + $name = $_GET["name"]; if (strlen($name) == 0) { xml_error(-1, "must set team name");