Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Let's say a user has Role1 and Role2.
How would I make an IMCE profile that would give that user access to /files/Role1 and /files/Role2.
I presume I would have to enter some PHP code in "Directory Path".
Could anyone give me a hint? Much appreciated.
Comments
Comment #1
SiFre CreditAttribution: SiFre commentedAs it turns out, IMCE allows an array as directory path...
This hacky line seems to work. It takes every role (skipping "authorized user") the user has and adds directory paths. It replaces the "æ" with a character that fits in a directory name, and replaces spaces, and finally adds a path in front of every directory.