@ultimatemembersupport can you please confirm @mpraetzel solution above and let us know if an update is on the way to fix this?
The problem is with the file:
/includes/core/class-form.php
The problem has to do with when adding the Roles (Dropdown) field that has custom roles added via Ultimate Member. This field sets role options, but as the title of the custom roles. When a user attempts to register, it checks the role selected against the options set for the field. The problem is on line 587 in the plugin the function custom_field_roles
returns the titles of the roles and then line 395 compares the slug for the role against the titles of the roles. No match is found and the registration fails because the plugin thinks a user is attempting to register with a non-existent role.
Solution:
Change line 395 of /includes/core/class-form.php form this:
( ! in_array( $role, $custom_field_roles, true ) || in_array( $role, $exclude_roles ) ) ) {
to this:
( /*! in_array( $role, $custom_field_roles, true ) ||*/ in_array( $role, $exclude_roles ) ) ) {
PLEASE NOTE: This is a hack and not how things should be done. For the time being it’ll get your registration back up until the Ultimate Member team rolls out a solution. The flaw with the solution is that someone could maliciously register with a non-existent role.