Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
consents.php000064400000002776151160174440007130 0ustar00<?php
/**
* @package Joomla.Plugin
* @subpackage Privacy.consents
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR .
'/components/com_privacy/helpers/plugin.php');
/**
* Privacy plugin managing Joomla user consent data
*
* @since 3.9.0
*/
class PlgPrivacyConsents extends PrivacyPlugin
{
/**
* Processes an export request for Joomla core user consent data
*
* This event will collect data for the core `#__privacy_consents` table
*
* @param PrivacyTableRequest $request The request record being
processed
* @param JUser $user The user account associated
with this request if available
*
* @return PrivacyExportDomain[]
*
* @since 3.9.0
*/
public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser
$user = null)
{
if (!$user)
{
return array();
}
$domain = $this->createDomain('consents',
'joomla_consent_data');
$query = $this->db->getQuery(true)
->select('*')
->from($this->db->quoteName('#__privacy_consents'))
->where($this->db->quoteName('user_id') . ' =
' . (int) $user->id)
->order($this->db->quoteName('created') . '
ASC');
$items = $this->db->setQuery($query)->loadAssocList();
foreach ($items as $item)
{
$domain->addItem($this->createItemFromArray($item));
}
return array($domain);
}
}
consents.xml000064400000001452151160174440007127 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin"
group="privacy" method="upgrade">
<name>plg_privacy_consents</name>
<author>Joomla! Project</author>
<creationDate>July 2018</creationDate>
<copyright>(C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.9.0</version>
<description>PLG_PRIVACY_CONSENTS_XML_DESCRIPTION</description>
<files>
<filename plugin="consents">consents.php</filename>
</files>
<languages>
<language
tag="en-GB">en-GB.plg_privacy_consents.ini</language>
<language
tag="en-GB">en-GB.plg_privacy_consents.sys.ini</language>
</languages>
</extension>