function themekey_ui_user_insert in ThemeKey 7.3
Same name and namespace in other branches
- 7 themekey_ui.module \themekey_ui_user_insert()
- 7.2 themekey_ui.module \themekey_ui_user_insert()
Implements hook_user_insert().
Parameters
$edit:
$account:
$category:
1 call to themekey_ui_user_insert()
- themekey_ui_user_update in ./
themekey_ui.module - Implements hook_node_update().
File
- ./
themekey_ui.module, line 398 - ThemeKey UI is an extension for ThemeKey
Code
function themekey_ui_user_insert(&$edit, $account, $category) {
if (user_access('assign theme to own nodes') && variable_get('themekey_ui_author', 0) && !empty($edit['themekey_ui_theme'])) {
db_merge('themekey_ui_author_theme')
->key(array(
'uid' => $account->uid,
))
->fields(array(
'uid' => $account->uid,
'theme' => $edit['themekey_ui_theme'],
))
->execute();
if (isset($account->themekey_ui_theme) && $edit['themekey_ui_theme'] != $account->themekey_ui_theme) {
// theme settings changed
// fast deletion of page cache (truncate)
cache_clear_all('*', 'cache_page', TRUE);
}
$edit['themekey_ui_theme'] = NULL;
}
}