Hello @geco300
You can add following code snippet to enable registration form for logged in users:
add_filter( 'um_registration_for_loggedin_users', '__return_true' );
Hello Aswin Giri and thank you for your help.
This tip seems to do part of the work but after the registration the firts user is logged out.
I explain an example:
1) User A (with fields: Name=”Geco”, Surname=”Black”, Nation=”ESP”) is logged in.
2) He registers the new user B (Name: Carl Surname: “White”, Nation: “the same of user A”).
3) After the registration, the User A is still logged in and could create other Users in the same way.
Is it possible to pass an attribute automatically from the user A to the user B?
Always Thank you and sorry for missing information.
Hello @geco300
Are you looking to login as newly registered user once the registration process is complete?
Hello,
the user A is logged in. He registers another users (user B), by filling out a form. Now, the plugin will execute an autologin to disconnect User A and to have the new user B logged in.
I needed to modify this process, in order to register the user B and then disabling the autologin function because i want the user A to stay logged in after he registered user B.
I managed to disable the autologin function so I have what i needed (in part).
Now I need a way to set default value for certain fields of the registration form to have it pre-compiled, but i can’t use (and don’t want to use) the default value in the edit form page.
I need something like the way the shortcodes usually pass attributes, for example [shortcode attr1=”pizza” attr2=”pasta”..] but with the [ultimatemember form_id=”143″ last_name=”geco”] shortcode attributes last_name=”geco” seem not working.
Thank you.
Hi @geco300
I suggest you redirect the user before it auto approves and log in the newly registered user by another user.
You can try this code snippet:
add_action("um_post_registration_approve_hook","um_062222_post_registration_approve_hook");
function um_062222_post_registration_approve_hook(){
wp_redirect("/my-custom-page/"); exit;
}
You can add the code snippet to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.
Thank you,
but it doesn’t seem to do the job, because the new user autologs in.
-
This reply was modified 1 week, 6 days ago by
geco300.