The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 22, 2012 5:43 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Feb 28, 2008 2:30 pm
Posts: 50
Location: Canada
Hello,
I am using swfupload inside custom php file that is embedded into joomla article using jumi.

Code:
global $direct_script_access;

$JEXEC_defined=defined('_JEXEC');

if ($JEXEC_defined==TRUE) {
   $direct_script_access=FALSE;
}

if ($JEXEC_defined==FALSE) {
   define( '_JEXEC', 1 );
   define( 'DS', DIRECTORY_SEPARATOR );
   define('JPATH_BASE', dirname(__FILE__) );
   require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
   require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
   $direct_script_access=TRUE;
   $JEXEC_defined=false;
   // initialize the application
   $mainframe =& JFactory::getApplication('site');
   $mainframe->initialise();
}

$user =& JFactory::getUser();

echo $user->username;


If I load the page directly "http://mysite.net/cadreq/incoming.php", I see the current logged username.

But in swfUpload in debug window I get an empty string for $user->username.

Does anyone has any idea how to get the current user while using swfUpload?

_________________
www.creationism.tk - Creationism Proofs and Facts


Top
 Profile  
 
PostPosted: Tue May 29, 2012 8:49 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Feb 28, 2008 2:30 pm
Posts: 50
Location: Canada
got the solution, see here viewtopic.php?f=304&t=720809

_________________
www.creationism.tk - Creationism Proofs and Facts


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 



Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group