Skip to main content

Role Combiner

You can use this module to grant roles based on other roles a user has based on properties of his name or both.

Adding a rule

To add a rule, click the green New rule button on the top of the Role Combiner settings page on the Dashboard. A new section will appear, allowing you to configure the rule.

info

You can delete the rule by clicking on the red trash icon.

Configuration

All rules are built up as a complete English sentence to make it easy for you to understand.

If you just created a new rule, you should see the possibility of granting a role to all users. This is, for example, useful to grant every member a role upon joining.

Grant / Remove

The first field allows you to select between Grant & Check, Only grant and Remove.

info
  • If you choose Grant & check, the role will be granted to all users matching the conditions (see below) and removed from everyone else.
  • If you choose Only grant, the role will be granted to all users matching the conditions (see below), but NOT removed from everyone else.
  • If you choose Remove, the role will be removed from everyone matching the conditions (see below) but NOT added to everyone else.

Role Selection

In the second field, please select the target role. It will be granted or removed based on the previous and following settings.

Conditions

The module not only allows to grant or remove a role to/from everyone - you can also limit this to users having or not having specific other roles or whose nicknames match a pattern or starts with a specific prefix.

To add such a condition, please click on the blue Add condition button. You can add as many conditions as you like.

info

You can delete the condition by clicking on the red trash icon left of it.

caution

If you set up multiple conditions, you can choose whether all of them or only one of them needs to be fulfilled by a user to get the role. On the bottom of the role combiner rule, choose AND if you want a user to fulfill all conditions to get the role, or choose OR to let Yunite grant the role once at least one condition is fulfilled.

Condition Type

You can select from six condition types:

FieldDescription
haveThe rule only applies to people having the role specified in the next field.
do not haveThe rule only applies to people NOT having the role specified in the next field.
display name starts withThe rule only applies to people whose display name starts with the text entered in the next field.
display name matchesThe rule only applies to people whose display name matches the regular expression pattern entered in the next field.
username starts withThe rule only applies to people whose username starts with the text entered in the next field.
username matchesThe rule only applies to people whose username matches the regular expression pattern entered in the next field.
nickname starts withThe rule only applies to people whose nickname starts with the text entered in the next field; if there is no nickname, the condition will always be false.
nickname matchesThe rule only applies to people whose nickname matches the regular expression pattern entered in the next field; if there is no nickname, the condition will always be false.
info

The username is the global username of a user (e.g., FooBar#1234, but without #1234), the display name is the nickname on this server if the user has a nickname, or the global username if there is no nickname set.

info

You can find more resources about regular expressions here.

Updates

Yunite will apply all rules immediately to users who are subject to a role update event or join newly and update all changes to existing users a short time after you saved the changes. Note that Yunite limits how fast it applies such changes to prevent too much resource consumption by this module.