wpress123
Forum Replies Created
-
@missveronicatv I figured it out on my own.
At registration I set the UM Role through the form.
UM Role is set as a single role by default. You cannot assign additional roles automatically via UM admin panel. You can manually set additional roles via WordPress user management after registration with a plugin but I wanted it automated and without more plugins.Upon registration, I add additional Role ID’s “vendor”, “seller”, etc. through functions.php.
I use “um_registration_set_extra_data” hook from UM to accomplish this: https://docs.ultimatemember.com/article/1235-umregistrationsetextradata
You can find all the Role ID’s in UM user roles admin panel. You have to use the Role ID, not the Role Title.Here’s the code if anyone else needs to do the same thing. This also checks if the roles exist so there are no errors.
Replace [MY_UM_ROLE_ID] with the um_role_ID (no brackets).
You can change the role priority here too (“10, 2” in example below) but that’s a different topic.// Automatically add additional roles to specific UM Role ID upon registration add_action( 'um_registration_set_extra_data', 'add_roles_to_[MY_UM_ROLE_ID]_users', 10, 2 ); function add_roles_to_[MY_UM_ROLE_ID]_users( $user_id, $query_args ) { ????if ( isset( $query_args['role'] ) && $query_args['role'] === '[MY_UM_ROLE_ID]' ) { ????????$user = get_user_by( 'id', $user_id ); ????????if ( $user ) { ????????????// The additional roles you want to add $user->add_role( '[ADDITIONAL_ROLE_ID_1]' ); $user->add_role( '[ADDITIONAL_ROLE_ID_2]' ); ????????} ????} }
Suppoprt doesn’t want to help with this so putting it out there for any guidance.
To clarify a bit further, in UM the role is the role ID, not the role name: e.g. member = um_member
The other plugins are the same names as the role ID’s. e.g. vendor = vendor
Never mind I sent in a support ticket.
Forum: Installing WordPress
In reply to: 500 Error installing 2.3Same exact problem here. I installed v2.3 on FreeBSD with hsphere and it doesn’t seem to want to work spittng out the same error code you get.
I also installed v2.2.3 and that works just fine albeit sloooooow to load most of the time. Maybe there’s a page caching plugin to fix that issue i can play with. I may have to go down to v2.2 which is working perfectly on a different domain but same server.
So it looks like something critical did indeed change between 2.2 and 2.3. The question still remains though….what?
Somehow I don’t think it’s a flaw in php itself….if wordpress is built to hog that much memory, well, that may be something to look into for new versions?