Here is what I need to do:
The user uploads an image, and I need to change the filename of the image to be firstname_lastname.filtype.
The first and lastname are stored within CiviCRM, but the upload is occuring in Drupal 7.
I'm thinking I need to write some PHP that pulls in the data from CiviCRM, and then sets it as the file name.
I'm still pretty new to Civi, can anyone give me some guidance on how I could go about doing this? How can I pull in the data from CiviCRM?
Or, is there a way to use CiviCRM tokens inside of Drupal?