WordPress.org

Ready to get started?Download WordPress

Forums

New user regiseration just for comment! Is it possible? (10 posts)

  1. timfar
    Member
    Posted 9 years ago #

    Hello
    Can any one please tell me how I can limit the weblog users to register only to leave comment and not to post? The problem I have at the moment is that any one who registers will get access to the wordpress admin area (just dashboard and profile) but I don't want my users to see the dashboard whihc has wordpress announcements to be visible to them. I did not have any problem before but a few days ago there was a security issue (27 May) on dashboard. This means if I do not check the dashboard regularly, my users might see the announcement earlier than me and if they are not right people can abuse this. SO is there anyway that I can avoid this and I set up the users I want them to post article to be added from admin area and for normal users who just can leave comments to be registered via weblog main page without having access to the dashboard etc...? or is it too much?

    Thank you

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    The dashboard announcement is public knowledge, and is a feed from this site. Restricting your dashboard would not stop them from finding this out. However, you could remove the feeds from the dash, but that then stops you from seeing the latest information.

  3. timfar
    Member
    Posted 9 years ago #

    Hi
    Thank you for that. Yes I realise if I remove the dashboard I can't see the announcements myself. But the point is some users, not neccesaryly know about how the wordpress is working. But when you put an anouncement like the one on 27 May (security issue) then people get curious to see what is goign on and even might want to try and see if we amended the scripts or not.
    So can you please tell me how I can remove the dashboard from the admin area. Perhaps I need to check your announcements manually on regular basis. So can you help please?

  4. timfar
    Member
    Posted 9 years ago #

    I got the answer from another post:

    I discovered how to solve this. Edited
    wp-admin/menu.php
    and made line 7 be
    $menu[0] = array(__('Dashboard'), 1, 'index.php');
    instead of
    $menu[0] = array(__('Dashboard'), 0, 'index.php');

    OK so I should have been able to work this out without asking, but then again, the default wordpress setting should not be that users (level 0) can see the Dashboard after they login - it is really confusing for them.

    Thanks anyway

  5. timfar
    Member
    Posted 9 years ago #

    Hi me again

    Interesting enough. The above post works when you first login. But if you go back to weblog while you are logged on and then go back to admin area it will show the dashboard again!!!! Any suggestion?
    Thanks

  6. Karel
    Member
    Posted 9 years ago #

    That seems to be because the link to the admin area goes straight to the Dashboard file (/wp-admin/ opens /wp-admin/index.php, which is the Dashboard). Perhaps you could hack wp_register() (where is that) and make a link to /wp-admin/profile.php. Or (easier and dirtier) rename index.php as, say, dashboard.php, and profile.php as index.php. And change the corresponding file names in menu.php, of course.

    I didn't test this!!

  7. timfar
    Member
    Posted 9 years ago #

    Karel Thank you. The only worries I have is if I rename the profile.php to index.php then there might be some other links to profile.php and those won't work or even worse make the script not to work all together. What do you think?
    Thanks

  8. Karel
    Member
    Posted 9 years ago #

    Good question. There are several references in several files in wp-admin only. That would raise ‘dirty’ to an artform.

    I found wp_register() in template-functions-general.php, and that hack seems preferable. Change

    /wp-admin/

    to

    /wp-admin/profile.php

    It works. Everyone now lands on his/her Profile page.

  9. timfar
    Member
    Posted 9 years ago #

    Hi
    You are the best. Thank you very much. It works perfectly. Thanks again.

    Cheers

  10. Karel
    Member
    Posted 9 years ago #

    Thank you too! I like it, and will leave it in.

    Note to self: start making a list of hacks *before* the next upgrade.

    Regards,

    Karel

Topic Closed

This topic has been closed to new replies.

About this Topic