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.
Hello - I'm aware that version 5 is unsupported but I work on an old Drupal 5 site and need some help with a bit of PHP to customise the output of a node variable. The variable ($node->name) shows the node author, but some author names are hashed and display like this: smith_fshdu34hfi83499huwuioijsafjj0398 - all I need to do is output ($node->name) with all the characters starting from the underscore removed. I've found this article on php.net which has various recipes but I'm not much good at PHP and can't work out how to adapt these to do this. Any help appreciated! :-)