Default User Roles
This is our first WordPress plugin. This plugin assigns a default role to WordPress
user accounts, which have none. This occurs when custom
_usermeta database tables are used. In such cases, the user will face
hassles upon trying to log in. To avoid this, the Default User Roles plugin should be
used. It should be configured with the name of the '_users' Database table, where the
user accounts are globally listed.
Install the plugin on your site and activate it. Once done, go to Users > Default Roles. Enter your '_users' Database prefix. For example, if your Users Database table is named 'wp49_users', then enter 'wp49_' as the prefix. Press Save. If you have other tables, then enter their prefixes in the 'Add New' field and add them, one by one.
Now, when a user creates an account on website A, their data is saved in 'websiteA_users'. When the same user logs in to website B, using the same credentials, the Default User Roles plugin, installed on website B, reads 'websiteA_users' and assigns a default role to the user on website B. Otherwise, the user would not have been able to log in on website B, as they do not have any role on that website.