function workspace_configure_form_submit in Workspace 7
Same name and namespace in other branches
- 5 workspace.module \workspace_configure_form_submit()
- 6 workspace.module \workspace_configure_form_submit()
Submit handler for per-user configuration form.
See also
File
- ./
workspace.module, line 264 - Presents a user-centric view of content.
Code
function workspace_configure_form_submit($form, &$form_state) {
// Must do a full user load to get existing serialized data.
#$account = user_load(array('uid' => $form_state['values']['uid']));
$uid = $form_state['values']['uid'];
$workspace = array();
$workspace['maxnodes'] = (int) $form_state['values']['maxnodes'];
$workspace['maxfilenames'] = (int) $form_state['values']['maxfilenames'];
if (module_exists('comment')) {
$workspace['maxcomments'] = (int) $form_state['values']['maxcomments'];
}
variable_del('workspace_user_config_' . $uid);
variable_set('workspace_user_config_' . $uid, $workspace);
drupal_set_message(t('The workspace preferences have been saved.'));
$form_state['redirect'] = 'workspace/' . $form_state['values']['uid'];
}