Title: Users and comments
Last modified: August 18, 2016

---

# Users and comments

 *  [purrkur](https://wordpress.org/support/users/purrkur/)
 * (@purrkur)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/users-and-comments/)
 * Hi all,
    I have installed 1.2 and I am evaluating it for the moment. There is
   one thing that is bugging me, although it might also be something that I have
   simply missed: I don’t want non-registered users to be allowed to post comments.
   Is there any way of getting that done? I don’t want to have to administer every
   comment written but I would like users to register and log in before they can
   enter their comments. As I said, I am very new to WordPress and it might just
   be that I have missed this feature, if it exists… Thanks, /Dave

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/users-and-comments/#post-56934)
 * You can restrict comments to registered users by editing index.php. Find the 
   line:
    `<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('
   Comments (%)')); ?>` and replace it with the following: `<?php if ($user_level
   > 0) comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments(%)'));
   else echo ("Please register in order to comment!"); ?> Change the contents of
   the last echo (or withhold it altogether) to change what non-registered users
   see.
 *  Thread Starter [purrkur](https://wordpress.org/support/users/purrkur/)
 * (@purrkur)
 * [21 years, 12 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57354)
 * Thanks Skippy. That was what I was looking for. I am very surprised that this
   isn’t a part of the standard package…
 *  Thread Starter [purrkur](https://wordpress.org/support/users/purrkur/)
 * (@purrkur)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57418)
 * Hmmm. I implemented the change from above written by Skippy but it is not really
   working as I would like it to.
    Here is what it does: A user has to register,
   log in and have their user level set above zero in order to post. That is exactly
   what I would like! The problem: Users with level set above zero are also able
   to post articles, even though I have set “Any registered member can publish articles”
   to “unset”. What I would like is to have visitors post comments but not post 
   articles. Is that possible? It seems that level 1 immediately allows users to
   post own articles which is a shame….
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57428)
 * `wp-admin\menu.php` controls what user levels are allowed to do what activities
   on your blog. Edit it to change the minimum user level required to post:
    `<ul
   id="adminmenu"> <?php // This array constructs the admin menu bar. // // Menu
   item name // The minimum level the user needs to access the item: between 0 and
   10 // The URL of the item's file $menu = array( array(__('Write'), 1, 'post.php'),
   array(__('Edit'), 1, 'edit.php'), array(__('Categories'), 3, 'categories.php'),
   array(__('Links'), 5, 'link-manager.php'), array(__('Users'), 3, 'users.php'),
   array(__('Options'), 6, 'options-general.php'), array(__('Plugins'), 8, 'plugins.
   php'), array(__('Templates'), 4, 'templates.php'), array(__('Upload'), get_settings('
   fileupload_minlevel'), 'upload.php'), array(__('Profile'), 0, 'profile.php') );
   Note that depending on how many levels of users you want to have, you may need
   to change several items in wp-admin\menu.php.
 *  Thread Starter [purrkur](https://wordpress.org/support/users/purrkur/)
 * (@purrkur)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57432)
 * Thanks for your help!
 *  [orlando](https://wordpress.org/support/users/orlando/)
 * (@orlando)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57579)
 * To skippy:
    Try this on WP 1.2 : Â» open menu.php and state ‘write’ level at 
   3. Â» create a ficticious user with (whatever) username and password; the new
   user will be placed at level 0 by the system. Logoff. Â» Login using the Admin
   user and password, and change the (whatever) new user level to 1. Logoff. Â» 
   Login again with the (whatever) new user you’ve just created. The user level 
   is standing at 1 now. You will see two menu links at the top of the screen: ‘
   Profile’ and ‘View Site’. Everything ok until now. Click on ‘View site’ and you’ll
   see the site on the same top screen. Look up for the ‘Login’ link on the weblog
   and click on it. You’ll be transported again to the ‘Login site’ BUT, this time,
   the ‘Write’ menu will appear at the screen, for a level one user, inspite of 
   the fact that the ‘menu.php’ Write level was stated at 3. Am I wrong or there’s
   a security bug here? Anyone help? Thks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Users and comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [orlando](https://wordpress.org/support/users/orlando/)
 * Last activity: [21 years, 5 months ago](https://wordpress.org/support/topic/users-and-comments/#post-57579)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
