function page_title_user in Page Title 5.2
Same name and namespace in other branches
- 6.2 page_title.module \page_title_user()
Implementation of hook_user().
3 string references to 'page_title_user'
- page_title_admin_settings in ./
page_title.admin.inc - Displays the form for the standard settings tab.
- page_title_page_get_title in ./
page_title.module - Determines what title should be sent to the page template.
- page_title_uninstall in ./
page_title.install - Implementation of hook_uninstall().
File
- ./
page_title.module, line 273 - Enhanced control over the page title (in the head tag).
Code
function page_title_user($op, &$edit, &$account) {
switch ($op) {
case 'update':
if (user_access('set page title')) {
db_query('DELETE FROM {page_title} WHERE type = "user" AND id = %d', $account->uid);
}
// Fallthrough to insert is intentional!
case 'insert':
if (isset($edit['page_title']) && drupal_strlen(trim($edit['page_title'])) > 0 && user_access('set page title')) {
db_query('INSERT INTO {page_title} VALUES("user", %d, "%s")', $account->uid, $edit['page_title']);
}
break;
case 'delete':
db_query('DELETE FROM {page_title} WHERE type = "user" AND id = %d', $account->uid);
break;
}
}