@ofiraa
Yes, it’s possible if you enable the Registration form for logged-in users
and pre-fill the Registration Form with default values with this code snippet:
add_filter( 'um_registration_for_loggedin_users', '__return_true' );
add_filter( 'um_field_value', 'um_field_value_admin_registration', 10, 5 );
function um_field_value_admin_registration( $value, $default, $key, $type, $data ) {
if( UM()->fields()->set_mode == 'register' ) {
$value = $default;
}
return $value;
}
Add the code snippet to your active theme’s functions.php file
or use the “Code Snippets” plugin.
https://wordpress.org/plugins/code-snippets/
-
This reply was modified 1 year, 11 months ago by
missveronica.
-
This reply was modified 1 year, 11 months ago by
missveronica.
@ofiraa
I have made an “Admin User Registrations” plugin of the code snippet
for easier installations and activation.
https://github.com/MissVeronica/um-admin-user-registrations
Hi @ofiraa
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