// Service : getusersettings

global $HTTP_RAW_POST_DATA;
$post = json_decode($HTTP_RAW_POST_DATA, true);
 

/*$post["pushnotification"] = 1;
$post['favoritenotification']=0;
$post['user_id']=478;*/
	$setting_user = array();

	if(@$post['user_id']){
	
		$update='SELECT pushnotification,favoritenotification FROM #__jetour_appusers WHERE user_id='.$post['user_id'];
		$db->setQuery($update);
		$settingresult = $db->LoadObject();
		$setting_user['pushnotification'] = $settingresult->pushnotification;
		$setting_user['favoritenotification'] = $settingresult->favoritenotification;
		 
			$arr = array('success' => 1, 'settings' => $setting_user);
			echo json_encode($arr);exit;
		 
	}else{
		$arr = array('success' => 0, 'message' => 'Please Login to update settings');
		echo json_encode($arr);exit;
	}