How to add new user group in Sngine?

Sngine has only 3 user groups

1- For admins 

2- For moderators

3- For Users (default group) so when a new user register his user_group set to 3 be default

And to add a new user group you will change some files (both view => HTML and code => PHP).

For example:

1- admin panel -> edit user

content\themes\default\templates\admin.user.tpl

includes\ajax\admin\user.php

Edit this will enable you to add new user_group “4” for example and change the user_group for any user from admin panel

For Pages, Groups and Events:

You can find all function related to the pages in

includes/class-user.php

The same thing for groups & events check the file to learn more …

Now you want to enable only the admins, moderator and users with user_group 4 to create/edit page So you need to change the check condition at top of create_page() function and edit_page() function and so on …

To be like that

Which mean if pages disable by the system and at the same time user group is 3 so this user can’t create a page

However admin, mods and user_group 4 people can continue …

And the same thing you will do for groups and events and so on.

That’s it Happy Sngine