I was able to implement multiple users and each user will have a separate folder. The code will generate folder for you. You just need to create USER in the WordPress.
My base folder is hard-coded to upload2, all user’s folder will be under it.
I included my code below. (double check your Fileaway’s Option)
if you log in as admin, the VAULT page will display all folders for all users.
Contact me if you have question. ( 350inusa @ gmail.com)
//———————- start UPLOAD page
[PHP]
global $current_user;
get_currentuserinfo();
if ( is_user_logged_in() )
{
echo (‘(500MB size limit per file)’);
echo do_shortcode (‘[fileup makedir=”true” fixedlocation=”‘ . $current_user->user_login . ‘” maxsize=”500″ maxsizetype=”m” uploadlabel=”UPLOAD now” base=2 sub=”‘ . $current_user->user_login . ‘” drawerid=2 uploader=”‘ . $current_user->user_login . ‘” matchdrawer=”2″ theme=”silver-bullet”]’ );
echo (‘<hr>
‘);
echo (‘If you have multiple files to upload, please zip them into 1 zip file, and then upload the zip file.
‘);
echo (‘<b>Please send an email to involved party after the upload is completed.’);
}
else
{
echo (‘
<font color=”red”>This feature is for registered user only. Please contact RSE staff for assistance.</font>’);
}
[/PHP]
//—————————- end UPLOAD page
#########################################################################
//—————————–start VAULT page (display uploaded files)
[PHP]
global $current_user, $filecount;
get_currentuserinfo();
if ( is_user_logged_in() )
{
if ($current_user->user_login == ‘admin’)
{
echo do_shortcode( ‘[fileaway type=”table” customdata=”Uploaded By” base=”2″ directories=”on”]’);
}
else
{
$directory = “./upload2/” . $current_user->user_login; // dir location
$files = scandir($directory);
for($i = 0 ; $i < count($files) ; $i++){
if($files[$i] !=’.’ && $files[$i] !=’..’){
$file_new[] = $files[$i];
}
}
$num_files = count($file_new)-1;
echo (‘File Count: ‘ . $num_files ); // Prints out how many were in the directory
echo do_shortcode( ‘[fileaway type=”table” customdata=”Uploaded By” base=”2″ sub=”‘ .
$current_user->user_login . ‘”]’);
}
}
else
{
echo (‘
<font color=”red”>This feature is for registered user only. Please contact RSE staff for assistance.</font>’);
}
[/PHP]
//—————————- end VAULT page