Skip to content

Instantly share code, notes, and snippets.

@dmuth dmuth/gist:1587038
Created Jan 10, 2012

Embed
What would you like to do?
Drupal shows "create content" menu item to anonymous users
<?php
/**
* From my blog post at:
*
* http://www.dmuth.org/node/1201/drupal-shows-create-content-menu-item-anonymous-users
*
*/
if (strstr($_SERVER["REQUEST_URI"], "/node/add")) {
if (empty($user->uid)) {
drupal_set_message("You must be logged in to do that");
drupal_goto("user");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.