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.
By permr on
Hi,
I know I can find information about users at "/admin/user", such as the time a user last accessed the site, but what I need is the PHP code that I can put in my custom profile page "user_profile.tpl.php" in order to display the information there.
How would I do (or where would I find) the PHP code that allows me to display the "Member for" and "Last access" info for a user in my custom profile page?
Thanks to all.
permr
Comments
user.module
user.module, I think.
What do I do with
What do I do with user.module?
Anyone? Drupal is a hard nut
Anyone? Drupal is a hard nut to crack. I am reading as much as I can. Can't seem to find an answer to my question regarding PHP code for "Last Access" and "Member For" data to put on custom profile page?
Can anybody help? Thanks.
There really isn't much more to say
You are going to need to open up the file named "user.module" and search for "Member For" and "Last Access". Both are there (I just tried it) and both are in the user_admin_account() function. All the pieces are there for you to pull out the information you are wanting. You will need to do some experimenting, though, to see which pieces to use.
the fields you're looking for...
are "access" and "created" in the users table.
Poolitics