From cf4ee5603be57aa184e7fd0650a18e3cf9aeda9f Mon Sep 17 00:00:00 2001 From: Michal Dziekonski Date: Sun, 13 Dec 2020 15:34:24 +0100 Subject: [PATCH] GH-139 Use account activation helper function in rest of the fleet sending code --- ajax/galaxyfleet.php | 5 +++-- ajax/sendmissiles.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ajax/galaxyfleet.php b/ajax/galaxyfleet.php index 17f86ca9b..66c3a03f5 100644 --- a/ajax/galaxyfleet.php +++ b/ajax/galaxyfleet.php @@ -42,10 +42,11 @@ function CreateReturn($ReturnCode) { CreateReturn('601'); } -if(!empty($_User['activation_code'])) -{ + +if (!isUserAccountActivated($_User)) { CreateReturn('661'); } + $Galaxy = (isset($_POST['galaxy']) ? intval($_POST['galaxy']) : 0); $System = (isset($_POST['system']) ? intval($_POST['system']) : 0); $Planet = (isset($_POST['planet']) ? intval($_POST['planet']) : 0); diff --git a/ajax/sendmissiles.php b/ajax/sendmissiles.php index dcb14cfdc..e7ce30523 100644 --- a/ajax/sendmissiles.php +++ b/ajax/sendmissiles.php @@ -23,8 +23,8 @@ function CreateReturn($ReturnCode, $Update = '0') { CreateReturn('601'); } -if(!empty($_User['activation_code'])) -{ + +if (!isUserAccountActivated($_User)) { CreateReturn('661'); }