This topic is locked

Restrict new menu item to Admin only

12/19/2012 11:35:01 AM
PHPRunner General questions
R
realtoast author

Hello.
I'm using the Classified template to build a simple site. When logged in as admin, the administrator sees the following left main menu on page, clmain:

  • Main
  • own_records
  • Users
  • Category
  • Subcategory
    When logged in as a user, the user sees just this:
  • Main
  • own_records
    I don't want random users registering. I want to add them myself as admin (incidentally, the "Add New User" button provided with the app fails. While it adds a row to the db, it does not create a registered user that can then log in).
    I would like to remove "Register" from the login form and then place a "Register New User" menu item on that left menu, but only viewable to admin. I've been able to create the menu item that does take me to the registration form. But, I'm unable to get that item to be viewable only to admin. I've been looking around PHPR and the forum and I'm not seeing how this is done. If successful, my new menus will look like this, respectively:
    Admin:
  • Main
  • own_records
  • Users
  • Category
  • Subcategory
  • Register New User
    User:
  • Main
  • own_records
    Any help greatly appreciated.
    Rob

Sergey Kornilov admin 12/19/2012

You can turn off Registration page. Admin can add new users directly to the login table. Make sure you restrict access to the login table via User Group Permissions.