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.
hi!
ok, sorry for asking but seriously, i don't know. it's probably a stupid thing.
i want a directory for single user based on a text field (alphanumeric code without space)
my code:
php: return 'users/'.$user->field_code;
return the creation of folder "Array". well i understand that it get it all wrong. what's php code to get the value?
Comments
Comment #1
michel3 CreditAttribution: michel3 commentedComment #2
michel3 CreditAttribution: michel3 commentedok, i did it
the correct code is:
php: return 'users/'.$user->field_code['und'][0]['value'];
thank to me! :)
Comment #3
michel3 CreditAttribution: michel3 commented