public static function deleteUser($obj_mainpacket) { $packet = $obj_mainpacket->packet; $userId = $packet[0]; $msg = "failed"; $result = 0; $result_userId = 0; $retResult = BL_manageUser::getUserListByuserId($userId); if ($retResult->type == 1) { $obj_User = $retResult->data[0]; $obj_result2 = DAL_manageUser::deleteUser($obj_User->userId); if ($obj_result2->type == 1) { $result = 1; $result_userId = $obj_User->userId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this User"; } } else { $msg = "Sorry!!! The User you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_User->userId, $msg); $obj_mainpacket->main_setPacket(); }