Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-04-01 15:05:20

rpain
New member
Registered: 2008-03-30
Posts: 1

Image path based on variable.

Hi,

I want to set the image folder path based on which user logs in to drupal 5.7. I know that $user->uid retrieves the userid from drupal so I've made the following code in the  config.inc.php file hoping that I can append the user id to the end of the path:

session_start();
global $user;
$_SESSION["usernum"] = $user->uid;    // Set name = form variable $name
$IMConfig['images_dir'] = "../../../../../files/images/" . $_SESSION['usernum'];


I originally didn't try session variables but it was a last resort...it still don't work, though. Any ideas?


Thanks,

Richard

Offline

Board footer

Powered by FluxBB