Closed (fixed)
Project:
OG User Roles
Version:
5.x-3.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2008 at 00:34 UTC
Updated:
5 Jan 2009 at 05:50 UTC
In the function og_user_roles_ognodeadd() after $type = $_GET['type']; you need to convert the dashes back to underscores otherwise if the content type contains underscores it will not match and you get and Access Denied.
$type = $_GET['type'];
if ($type) {
+ // Convert the dashes in the URL back to underscores.
+ $type = str_replace('-', '_' , $type);
// Got this from node.module (node_access)
// No matter the type, this should return us the create permission.
$module = node_get_types('module', $type);
Comments
Comment #1
somebodysysop commentedThanks for the code. Committed to 5.x-3.x-dev release which should be available in the next 13 hours.