function themekey_user_profile_themekey_ui_settings_form_validate in ThemeKey 7.2
Same name and namespace in other branches
- 7.3 themekey_user_profile.module \themekey_user_profile_themekey_ui_settings_form_validate()
Validation of
See also
1 string reference to 'themekey_user_profile_themekey_ui_settings_form_validate'
- themekey_user_profile_form_alter in ./
themekey_user_profile.module - Implements hook_form_alter().
File
- ./
themekey_user_profile.module, line 87 - ThemeKey User Profile allows the user to select a personal theme in her user profile. This theme will be used to render the pages instead of the theme the administrator configured as soon as the user logs in.
Code
function themekey_user_profile_themekey_ui_settings_form_validate(&$form, $form_state) {
$selectable_themes = array_diff($form_state['values']['themekey_ui_selectable_themes'], array(
'0',
));
if (empty($selectable_themes)) {
if ($form_state['values']['themekey_ui_user_profile']) {
form_set_error('themekey_ui_selectable_themes', t('You need to activate at least one selectable theme.'));
}
}
}