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.
Is there a way to pull a field from the profile ?
Is there a way to pull a field from the profile ?
Comments
Comment #1
tommytom CreditAttribution: tommytom commentedis it possible or do I have to use Content Profile module that build user profiles as normal nodes.
Comment #2
tommytom CreditAttribution: tommytom commentedfor example I'm trying to calculate and display the age of an user with this code:
but I always get the value "2009", so I think this is wrong:
($account->profile_birthdate['year'])
the date in the database is stored in this format: a:3:{s:5:"month";s:2:"12";s:3:"day";s:2:"28";s:4:"year";s:4:"1985";}
I found the code from this article: http://drupal.org/node/45763
Can somebody help me ?
Comment #3
tommytom CreditAttribution: tommytom commentedI solved the issue with this code:
Comment #4
mmjvb CreditAttribution: mmjvb as a volunteer commented