Services

  • Drupal CMS Developer
  • Website speed optimisation
  • Drupal 6 to Drupal 8 migrations

Welcome

Welcome, I am a Web Developer based in Madrid, Spain originally from the UK. I studied Computer Science & eBusiness at Loughborough University. I specialise in Content Management System websites

Display signature in User profile page

I was really surprised that Drupal as standard did not show the user signature on the user profile, it doesn't even give you the option! It's really simple to do if you know how but took me a while to figure out.

You must create a module (see drupal documentation for doing that) and paste the following in...

function MYMODULE-NAME_profile_alter(&$account) {
$account->content['summary']['signature'] = array (
'#type' => user_profile_item,
'#title' => t('About the writer'),
'#value' => $account->signature,
'#weight' => -1,
);
}

Be sure to change MYMODULE-NAME to the name of your module. Then all you need to do is activate the module and the signature will appear. You can change the title above, I have also put it through the t() function so that it is translatable.