function page_title_user_insert in Page Title 7.2
Same name and namespace in other branches
- 8.2 page_title.module \page_title_user_insert()
- 7 page_title.module \page_title_user_insert()
Implement hook_user_insert().
File
- ./
page_title.module, line 490 - Enhanced control over the page title (in the head tag).
Code
function page_title_user_insert(&$edit, &$account, $category) {
if (user_access('set page title') && isset($edit['page_title']) && drupal_strlen(trim($edit['page_title'])) > 0) {
db_insert('page_title')
->fields(array(
'type' => 'user',
'id' => $account->uid,
'page_title' => $edit['page_title'],
))
->execute();
}
}