Title: Multiple user registration
Last modified: February 4, 2025

---

# Multiple user registration

 *  Resolved [the4bee](https://wordpress.org/support/users/the4bee/)
 * (@the4bee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/multiple-user-registration-2/)
 * I need to allow a specific role to user the register form to register new users.
   
   As it is a logged in user cannot access the register form.How can I access it?
   I am then going to process the data using ‘um_registration_complete’

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/multiple-user-registration-2/#post-18284959)
 * [@the4bee](https://wordpress.org/support/users/the4bee/)
 * You can try the “Admin User Registrations” plugin
 * [https://github.com/MissVeronica/um-admin-user-registrations](https://github.com/MissVeronica/um-admin-user-registrations)
 *  Thread Starter [the4bee](https://wordpress.org/support/users/the4bee/)
 * (@the4bee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/multiple-user-registration-2/#post-18285009)
 * Magic! 
   I will go through it and see how I can adapt it to another user role.
   Then I will mark the thread solved.
 * Thank you very much!
 *  Thread Starter [the4bee](https://wordpress.org/support/users/the4bee/)
 * (@the4bee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/multiple-user-registration-2/#post-18285725)
 * It seems that the provided code allows access to any logged in user.
   The following
   is modified for access only by administrator or partner_manager roles:if ( ! 
   defined( ‘ABSPATH’ ) ) {exit;}
 * add_action( ‘init’, ‘custom_um_registration_access’ );
   function custom_um_registration_access(){//
   Check if Ultimate Member is available.if ( ! function_exists( ‘UM’ ) ) {return;}
 *     ```wp-block-code
       // If the user is logged in, verify they have an allowed role.
       if ( is_user_logged_in() ) {
           $current_user = wp_get_current_user();
           $allowed_roles = array( 'administrator', 'partner_manager' );
           if ( ! array_intersect( $allowed_roles, $current_user->roles ) ) {
               // User is logged in but not allowed; do not modify registration access.
               return;
           }
       }
   
       // Either not logged in, or logged in with allowed role.
       add_filter( 'um_registration_for_loggedin_users', '__return_true' );
       add_filter( 'um_field_value', 'custom_um_field_value_admin_registration', 10, 5 );
       ```
   
 * }
 * function custom_um_field_value_admin_registration( $value, $default, $key, $type,
   $data ) {
   // Ensure Ultimate Member’s fields are available.if ( function_exists(‘
   UM’ ) ) {$fields = UM()->fields();// Check that the fields object exists and 
   that we are in registration mode.if ( is_object( $fields ) && isset( $fields-
   >set_mode ) && ‘register’ === $fields->set_mode ) {$value = $default;}}return
   $value;}
 *  Plugin Support [Yurii](https://wordpress.org/support/users/yuriinalivaiko/)
 * (@yuriinalivaiko)
 * [1 year ago](https://wordpress.org/support/topic/multiple-user-registration-2/#post-18500810)
 * Hi [@the4bee](https://wordpress.org/support/users/the4bee/)
 * This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to re-open this thread if any other questions come up and we’d
   be happy to help. 🙂
 * Regards

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Multiple user registration’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Yurii](https://wordpress.org/support/users/yuriinalivaiko/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/multiple-user-registration-2/#post-18500810)
 * Status: resolved