I have integrated JForum into one of my web application. I add new users to my application and at the same time I want to add these new users to the JForum also, so that once they login to my application they can start accessing the forum.
Right now I am doing this manually, adding each user from the admin tool of Jforum. But it is now becoming cumbersome as there are many users getting added each day.
Can someone help me with the SQL inserts and the appropriate tables for adding users? Also, I need queries to give access to only selected categories and forums within the category to the users. Also, I need queries for giving specific permissions for each user (like disable new posts etc.).
Satish. [originally posted on jforum.net by nosaku]
Take a look at the *_data_dump.sql files in the config/database/* directories. This is a set of manual queries that sets up the initial jForum users, groups, rights, and forums.
If I remember correctly, you basically have to add the entry in the user table and then add the user to the user_groups table.
FYI - Users an not given permissions. This is all done thru groups. It is possible to set up groups and permissions thru SQL but it is VERY tricky and there are a lot of situations where you can easily end up with more rights than you wanted.
In addition, there is a permissions cache. This means that even if you add the records, the memory cache may not be up to date.
This is a case that the best way to do this if via the admin screen or to have code that submits the same information as the admin screen. IMHO, This is a lot easier and safer than trying to hack the underlying DB. [originally posted on jforum.net by monroe]