Mentre il PHP completo è questo:
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
// Import library dependencies
jimport('joomla.plugin.plugin');
class plgUserCreateFolder extends JPlugin {
//function plgContentCreateFolder( &$subject, $config ) {
function plgUserCreateFolder( &$subject, $config ) {
parent::__construct( $subject, $config );
}
//function onBeforeDisplayContent() {
//function onLoginUser() {
function onUserLogin($user, $options = array()) {
//$user = JFactory::getUser();
$mode = 0744;
$user_id = (int)$user['id'];
//if ($user->id!=null) {
if ($uid = intval(JUserHelper::getUserId($user['username']))) {
$path = JPATH_SITE . '/images/content/' . $user_id;
JFolder::create($path);
return true;
} else {
$path = JPATH_SITE . '/salvo';
JFolder::create($path);
return false;
}
}
}
?>
Grazie per l'aiuto!!!