Warning message

Newsletter category Drupal Developer newsletter format has not been set to HTML. There will be no statistics recorded for this newsletter.

Drupal: Change User account title

This CodeLet will change the title of the User account page. It will consider and set user's 'username' as the titlte of the account page. Drupal offers this by default. But this can be used when some other modules have already modified the title.

Module Info

name = User account Utilities
description = Different tweaks for User account.
core = 7.x

CodeLet: 

/**
* @file
*
* Different tweaks for User account
*
* @author DrupalD
*/

/**
* Implementation of hook_user
*
* @param $account
* @param $view_mode
* @param $langcode
* @author DrupalD
*/
function users_utils_user_view($account, $view_mode, $langcode) {
drupal_set_title($account->name);
}

By DrupalD on Thu, 20/02/2014 - 4:35pm

Add comment

Log in or register to post comments
QR code for this page URL This page URL
Feedback