Solution
Introduction
The Control Panel link to configure the jforum (Forum) feature in API Portal is visible only to administrative users. By default, the admin user created in API Portal is also generated in the jforum application so they
appear to be one and the same. However, if an administrator changes the forum administrative username, it will break the connection between the admin user in CMS and the admin user of the forums and thus removing the Control Panel link to the forums. This article will describe how to get access back and how the process works between jforum and API Portal users.
API Portal & jforum users
The API Portal users are separate from jforum users, however users tend to see them as one and the same because the API Portal automatically generates a jforum user when a new API Portal user is created. It generates them with the exact same username as what is in the API Portal CMS Users panel. That sync between them (for example, how to recognize an administrator for the forums) is based entirely on the exact match of a username in both systems.
How to access the jforum control panel if admin is lost
You can access the control panel again even if you changed the username in the forums. You can do this by using the following commands:
- SSH into your API Portal node and get to a privileged command prompt.
- Run the following MySQL commands:
# mysql
# use lrs;
# select * from jforum_users\G
-- At this point, you should see a listing of the multiple users that exist in the jforum component. There you should see a second admin user that you had renamed earlier. If so, then follow the remaining commands: --
# update jforum_users set username="admin" where username="<new admin>"; (<---- Where <new admin> equals exactly the name of the admin you renamed it to and it is case-sensitive.) - Log out of the API Portal dashboard and clear your cache and history just to be on the safe side.
- Log back in to the API Portal dashboard as your admin user
- Navigate to the Forums page and if the above worked then you will see a Control Panel link at the bottom of the forums page again just as before the username changes were made in the first place.
Additionally, an alternative is as follows, however we do recommend the above procedure when recovering from an unintended change.
- SSH into your API Portal node and get to a privileged command prompt.
- Run the following MySQL commands:
# mysql
# use lrs;
# select * from jforum_users\G
-- At this point, you should see a listing of the multiple users that exist in the jforum component. There you should see a second admin user that you had renamed earlier. If so, then follow the remaining commands: --
# update jforum_users set username="newadmin" where username="<new admin>"; (<---- Where <new admin> equals exactly the name of the admin you renamed it to and it is case-sensitive.) - Log out of the API Portal dashboard and clear your cache and history just to be on the safe side.
- Log back in to the API Portal CMS (/admin) system and create a new admin user with the username of "newadmin" and a preferrably a password that matches the old admin's password.
- Log out of the API Portal CMS (/admin) system and clear your cache and history just to be on the safe side.
- Log back in to the API Portal dashboard as your newadmin user.
- Navigate to the Forums page and if the above worked then you will see a Control Panel link at the bottom of the forums page again.