Permissions problem
-
Hi,
I created a plugin called Category Manager, that allows wp users to ordre, create, delete and edit categories among other things. It is still in beta version.A user who tried it informed me that he got the following error message when trying to create a new category:
“You don’t have permission to access /wp-admin/”
I dont quite understand why this happens, since to create a new category, my plugin uses quite the same code as WordPress :
if ( !current_user_can(‘manage_categories’) )
die (__(‘Cheatin’ uh?’));wp_insert_category($_POST);
wp_redirect(‘edit.php?page=category-manager.php’);That’s all. Only the redirection changes. Any idea why one might get such an error? Maybe adding
‘require_once(admin.php)’ above this might do the trick. However I have no possibility to test since I dont have the error.The plugin’s page :
- The topic ‘Permissions problem’ is closed to new replies.