• Resolved makmerghen

    (@makmerghen)


    hello
    mentioned in the new update the next
    Added: Hook to unlock the ability to add new users through the registration form

    is that mean that the logged-in user can add new users using UM registration form such as adding user from admin area ?
    if yes
    how to find this option ?
    best regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter makmerghen

    (@makmerghen)

    answer please

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @makmerghen

    If you don’t use custom callback scripts at your side there isn’t possible to use the registration form for creating new users.

    We display registration form for logged-in users only if the customer add this code to the theme’s functions.php file:

    add_filter( 'um_registration_for_loggedin_users', '__return_true' );

    Let me know if you have other questions,
    Best Regards!

    Thread Starter makmerghen

    (@makmerghen)

    thank you so so much for this help
    another thing please
    now I can logged in and register new users
    1-i want after register the new user to send him message contains :-
    auto generated password
    (if not possible) then in stead to contains link to create new password

    2-this message will be in email
    and if possible in addition to be in email to be also by SMS in case there are any recommended plugin can do that with UM

    best regards and thank you again

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @makmerghen

    1. You can use this code snippet to trigger the reset password on registration:

    add_action("um_registration_complete","um_051121_generate_pass_reset_registration", 1, 2 );
    function um_051121_generate_pass_reset_registration( $user_id, $args ){
    
        um_fetch_user( $user_id );
        UM()->user()->password_reset();
    
    }

    You can add the above code to your theme’s functions.php file or use the Code Snippets plugin.

    2. Unfortunately, we don’t have any customization or integration with SMS yet. hopefully, someone in the forum has done something similar and shares their solution here.

    Regards,

    • This reply was modified 3 years, 6 months ago by Champ Camba.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @makmerghen

    …Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter makmerghen

    (@makmerghen)

    Hi @nsinelnikov , @champsupertramp
    sorry for my late response I was have critical health issue in my family

    as per your instruction I used
    add_filter( 'um_registration_for_loggedin_users', '__return_true' );

    to make the logged in user can add new users while he is log in (that worked)

    and I used
    add_action(“um_registration_complete”,”um_051121_generate_pass_reset_registration”, 1, 2 );
    function um_051121_generate_pass_reset_registration( $user_id, $args ){

    um_fetch_user( $user_id );
    UM()->user()->password_reset();

    }

    to send password reset link to the new created user (but no thing was sent)
    in addition to that that both admin and the new user didn’t get any emails about the new registration

    so please advise
    best regards

    Thread Starter makmerghen

    (@makmerghen)

    waiting for you answer

    Thread Starter makmerghen

    (@makmerghen)

    @nsinelnikov , @champsupertramp
    sorry dear
    both worked but there are one issue don’t know how to fix

    when I made user can use the registration form while he logged in after finish the registration of the new user the next happened :
    1- the current logged in user (userA) became logout and the new registered user (userB) become logged in

    how to make (userA) still logged in even after he finished the registration of the other new users
    thanks

    • This reply was modified 3 years, 5 months ago by makmerghen.
    • This reply was modified 3 years, 5 months ago by makmerghen.
    Thread Starter makmerghen

    (@makmerghen)

    waiting for your answer

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @makmerghen

    Sorry for the delay. It seems the email notification has been lost in the inbox routine.

    We have opened the ability to register users using the registration form for the logged-in administrator using a hook. This is not a fully supported feature out of the box by default, it just opens up additional possibilities when using your custom code.

    Since the registration form uses the settings of the role under which the user was created https://www.screencast.com/t/BTq4uskmV

    There is a place where we based on the user status make the auto-login
    https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-register.php#L186

    You could replace this handler with your own custom code using UM hooks.

    Let me know if you have other question and sorry for the delay again,
    Best Regards!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘new update inquiry’ is closed to new replies.