Web: make TEAM_CREATE_NEED_CREDIT work for team-create RPC too

This commit is contained in:
David Anderson 2017-04-09 00:37:27 -07:00
parent dce6254411
commit 6aebbdb213
1 changed files with 6 additions and 0 deletions

View File

@ -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");