Role Mapping refers to assigning roles to users, based on the ownership of NFTs. Role Mapping in this context specifically refers to the ownership of NFTs mapped to different Wordpress Roles and the subsequent assignment of roles to the users relevant to these NFTs .
The admin can map which NFTs the user should own in order to obtain a specific WordPress role.
When a user logs in to WordPress using its Web3 Crypto Wallet, the user is assigned a role that is relevant to the NFTs that the user owns.
Step:1 Configure the NFTs
Open the Contract Address Config tab and click on Add Token Details button.
Enter the valid details for your NFTs which you want to configure (Refer the below table) and click on Add button.
Choose appropriate blockchain for the NFT to be configured.
Contract Address Name
Add a relevant name
Enter the Contract Address of NFT Collection
Enter the minimum number of tokens the end user should hold.
Token Ids (Optional)
Enter specific Token Ids that user should have
Now, you will see that the nft deatils has been added to the list on the Contract Address Config tab .
Step:2 Add Role Mapping
Go to miniOrange Web3 Login >> Role mapping tab and enable the Role Mapping option it will mapped the user roles based NFTs he own.
Select the options you want to apply to the users and Choose the contract addresses to map to the WordPress role.
Enter Contract Address Name
This is toggle check to enable the NFT role mapping
Keep existing user roles
Existing Wordpress Users will not be assigned roles mapped in the role mapping configs
Dont Disturb existing user roles
New roles will be added to the existing roles for already logged in users.That is multiple roles will be added .
Don't allow login
User won't be logged in if they don't have any role/group mapped to their user profile
This helps to give default role to the users who don't satisfy any criteria in roles mapped
A role can have multiple contract addresses assigned to it and also user will be assigned that role if the user has any of those mapped contract addresses.
Select the Wordpress role to be assigned for those contract addresses.
Click on the Save Mapping button to add the Role Mapping Configuration.
You can also Delete specific Roles Mapped if they are no longer required .
Click on Add More Mapping in order to map other roles and repeat the above steps .