• Resolved morrischapman

    (@morrischapman)


    Hi everybody,

    Quick question about the email notifications. A new user should be reviewed by administrator to be accepted, but should be auto-accepted if his email domain is in the list of Approved domain. Logical.

    Currently, if a user has an email in the approved domains list, he receives 2 emails at the same time. One for the “pending review” and the other to notify that his account is accepted.
    How do I make it so that he only receives the welcome email?

    Thank you very much for your help.
    D

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @morrischapman

    Did you make any customization with UM hooks?

    Regards,

    Thread Starter morrischapman

    (@morrischapman)

    Hello Champ Camba,

    Sorry for ma late reply.
    Currently not. Do we have to write a function?
    The double email issue is sorted but we still have 1 problem.

    The administrator receives an email to “approve” a new user even if it is an email from a domain approved.
    The new user is correctly auto-approved in the backend but the admin should not receive a notification to approve/reject it.
    Is this something to be fixed with a hook?

    Thanks for your help.
    Regards.
    David

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @morrischapman

    Have you tried disabling the notifications that you don’t need via WP Admin > Ultimate Member > Emails?

    Regards,

    Thread Starter morrischapman

    (@morrischapman)

    @champsupertramp
    Thanks for your response

    Yes. Currently, we have https://prnt.sc/1xhur8j these notifications enabled.
    Admin should receives only one notification.

    If the email is part of the domains accepted, he receives an email with a new user notification. But if the email is not part of these domains auto-accepted, he should receives also a unique email, an email with the choice to accept/reject the user:

    If you think that the application for registration to {display_name} should be accepted, please
    click on this link to accept
    {approve_url}
    If you think that the application for registration to {display_name} should be refused, please
    click on this link to refuse
    {reject_url}

    if “Account Needs Review Notification” is enabled, the admin receives 2 emails at the same time when the user email is part of the domains accepted.

    Is this sufficiently well explained?
    Thanks
    D.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @morrischapman

    It’s not clear with the part of the domain. Do you have any customization with UM hooks?

    Regards,

    Thread Starter morrischapman

    (@morrischapman)

    @champsupertramp

    I express myself badly sorry.
    “part of the domain” = the email is one of the authorized domains.
    “Do you have any customization with UM hooks?” No

    David

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @morrischapman

    >>> `Currently, if a user has an email in the approved domains list, he receives 2 emails at the same time. One for the “pending review” and the other to notify that his account is accepted.
    How do I make it so that he only receives the welcome email?`

    You can try adding this code snippet to send the Welcome Email after approving the user by administrator:

    add_action("um_when_status_is_set","um_102821_send_welcome_email");
    function um_102821_send_welcome_email( $status ){
    
        if ( um_user( 'account_status' ) == 'awaiting_admin_review' ) {
            UM()->mail()->send( um_user( 'user_email' ), 'welcome_email' );
        }
    }

    You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @morrischapman

    ..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 by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘pending review + domain approved + emails’ is closed to new replies.