function workspace_list_form_submit in Workspace 7
File
- ./
workspace.module, line 727 - Presents a user-centric view of content.
Code
function workspace_list_form_submit($form, &$form_state) {
$account_id = $form_state['values']['account_id'];
$node_type = $form_state['values']['content_type'];
if ($node_type == t('Select...')) {
drupal_goto('workspace/' . $account_id . '/content');
}
$account = user_load($account_id);
foreach (node_type_get_types() as $type => $object) {
if (node_access('create', $type, $account)) {
$options[$type] = $object->name;
}
if (isset($options[$node_type])) {
drupal_goto('workspace/' . $account_id . '/content/' . $node_type);
}
}
}