menu_node_edit_user_node_types($account = NULL)Get the node types that this user can edit.
$account The user account being checked (optional).
An array of node types.
./menu_node_edit.module, line 685
<?php
function menu_node_edit_user_node_types($account = NULL) {
$allowed = array();
$types = node_get_types();
foreach ($types as $type => $value) {
if (user_access('administer nodes', $account) || user_access('edit all '. $type .' content in assigned sections', $account) || user_access('edit any '. $type .' content', $account)) {
$allowed[] = $type;
}
}
// Blogs are a goofy case.
if (array_key_exists('blog', $types) && !in_array('blog', $allowed) && user_access('edit any blog entry', $account)) {
$allowed[] = 'blog';
}
return $allowed;
}
?>