From f46a9827fe0fd9eab735d8ecb67a5f91d777bd39 Mon Sep 17 00:00:00 2001 From: tripathyr Date: Sat, 6 Nov 2021 10:10:40 +0530 Subject: [PATCH] Check FLO ID active and registration status --- classes/Users.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/classes/Users.php b/classes/Users.php index b8033d4..3c9e4d9 100644 --- a/classes/Users.php +++ b/classes/Users.php @@ -219,6 +219,47 @@ class Users { return false; } + + public function check_flo_id_active_status($flo_id) { + + if ($this->databaseConnection()) { + + $query = $this->db_connection->prepare("SELECT * FROM $this->customers_table WHERE flo_id = :flo_id AND is_active = 1 LIMIT 1"); + $query->bindParam('flo_id', $flo_id); + + if ($query->execute()) { + $row_count = $query->rowCount(); + if ($row_count == 1) { + return true; + } + return false; + } else { + return false; + } + } + return false; + } + + public function check_flo_id_registration_status($flo_id) { + + if ($this->databaseConnection()) { + + $query = $this->db_connection->prepare("SELECT * FROM $this->customers_table WHERE flo_id = :flo_id LIMIT 1"); + $query->bindParam('flo_id', $flo_id); + + if ($query->execute()) { + $row_count = $query->rowCount(); + if ($row_count == 1) { + return true; + } + return false; + } else { + return false; + } + } + return false; + } + public function displayUserTransaction($user_id, $start=0, $limit=10) { if ($this->databaseConnection()) { $transactions = array();