Forum role – user groups
Quote from Aniruddha on November 21, 2018, 5:54 amhi @asgaros
Thanks for the info .
I have another question regarding the Forum role . I have to change the forum role to moderator in the registration form.
if we change the role in registration form it should change there also.
And also same thing for the User Groups .so that user can change the user group and forum role in time of registration .
i have added Forum role and User Group drop down in the registration page but how to link those two entities.
the change in the registration form should reflect in the backend as well pls provide the code or solution for this
hi @asgaros
Thanks for the info .
I have another question regarding the Forum role . I have to change the forum role to moderator in the registration form.
if we change the role in registration form it should change there also.
And also same thing for the User Groups .so that user can change the user group and forum role in time of registration .
i have added Forum role and User Group drop down in the registration page but how to link those two entities.
the change in the registration form should reflect in the backend as well pls provide the code or solution for this
Quote from Asgaros on November 21, 2018, 8:02 amHello @aniruddha
It is not possible for normal users to change their role or usergroup because those are intended for administrators to set acccess-permissions for certain users/categories. If it would be possible for users to change their role/usergroup by themself, it would be possible for them to access areas of the forums which should be not accessible for them.
If you want to change this behavior you have to modify a lot of the core-files inside of the plugin as well as adding additional custom-implementations via hooks/filters.
Hello @aniruddha
It is not possible for normal users to change their role or usergroup because those are intended for administrators to set acccess-permissions for certain users/categories. If it would be possible for users to change their role/usergroup by themself, it would be possible for them to access areas of the forums which should be not accessible for them.
If you want to change this behavior you have to modify a lot of the core-files inside of the plugin as well as adding additional custom-implementations via hooks/filters.
Quote from Aniruddha on November 21, 2018, 8:06 amhi (@asgaros)
i understand the risk and i have to make all users as moderators by default and i want regulate the user group as wellis there a way?
in my form there are three user groups that must be selected by the end users only so
hi (@asgaros)
i understand the risk and i have to make all users as moderators by default and i want regulate the user group as wellis there a way?
in my form there are three user groups that must be selected by the end users only so
Quote from Asgaros on November 24, 2018, 3:36 pmHello @aniruddha
Basically you can use the user_register hook which gets executed when a new user registers. Via this hook you can add the moderator-flag:
update_user_meta($user_id, 'asgarosforum_role', 'moderator');I dont exactly know which plugin you want to use for adding custom-data to your registration-form, but the usergroups are using the asgarosforum-usergroup taxonomy-name.
Hello @aniruddha
Basically you can use the user_register hook which gets executed when a new user registers. Via this hook you can add the moderator-flag:
update_user_meta($user_id, 'asgarosforum_role', 'moderator');
I dont exactly know which plugin you want to use for adding custom-data to your registration-form, but the usergroups are using the asgarosforum-usergroup taxonomy-name.
