<?php
	// required headers
	header("Access-Control-Allow-Origin: *");
	header("Content-Type: application/json; charset=UTF-8");
	 
	// include database and object files
	include_once '../config/database.php';
	include_once '../objects/user.php';
	 
	// instantiate database
	$database = new Database();
	$db = $database->getConnection();
	 
	// initialize object
	$user = new User($db);
	$data = json_decode(file_get_contents("php://input"));
	$user->uid=$data->uid;
	$user->getOneRow();

			$user=array(
				// "id" => $userrole->id,
				"username" =>$user->username,
				"password" =>$user->password,
				
			);
	 
			echo json_encode($user);
		
?>