• Resolved 1jd123

    (@1jd123)


    Dear all,

    in the last days it became visible that many of the registered users have not activated their accounts. This leads to a major problem.

    In our opinion they may have overlooked the mail regarding the registration of their account. In the Forminator submissions list of the registration form I can see all users who have registered but not activated yet.

    How can I resent the activation mail? This is kind of urgent since these not activated users are not listed in the users.php page and I urgently need a solution to resend the activation mail.

    Could you please help us with this?
    Looking forward to hear from you.

    Best,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @1jd123

    I hope you are doing well today.

    When you expand a registration submission that requires email activation, it will have a Resend Activation Link button you can click if needed.

    Please check our guide:
    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#user-registration-form-submissions

    Kind Regards,
    Kris

    Thread Starter 1jd123

    (@1jd123)

    Hello,

    thank you so much for the quick response. I am aware of this function but I have about 850 users to do that with. Could you please provide a more convenient solution?

    thanks in advance

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @1jd123

    We don’t have a bulk option, but we pinged our developers to verify if we can find any workaround for you.

    We will keep you posted.
    Best Regards
    Patrick Freitas

    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @1jd123,

    I hope you are doing well today!

    Our SLS team provided the following code snippet for you to try as a mu-plugin

    <?php
    add_action('admin_init', 'wpmudev_resend_activation_link');
    function wpmudev_resend_activation_link() {
    	if ( ! current_user_can( 'manage_options' ) ) {
    		return;
    	}
    
    	if ( isset( $_GET['page'] ) ) {
    		if ( $_GET['page'] == 'forminator-entries' && isset( $_GET['form_id'] ) ) {
    			if ( ! isset( $_GET['formi_resend_notification'] ) ) {
    				return;
    			}
    
    			global $wpdb;
    			
    			$form_id 		  = $_GET['form_id'];
    			$table_name       = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY_META );
    			$entry_table_name = Forminator_Database_Tables::get_table_name( Forminator_Database_Tables::FORM_ENTRY );
    			$sql              = "SELECT m.meta_value FROM {$table_name} m LEFT JOIN {$entry_table_name} e ON(e.entry_id = m.entry_id) WHERE e.form_id = %d AND m.meta_key = %s AND ( e.draft_id IS NULL OR e.draft_id = '' ) AND e.is_spam = 0 order by m.meta_id";
    			$entry_ids        = $wpdb->get_results( $wpdb->prepare( $sql, $form_id, 'activation_key' ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    			if ( ! empty( $entry_ids ) ) {
    				foreach ( $entry_ids as $entry ) {
    					$activation_key = $entry->meta_value;
    					if ( ! empty( $activation_key ) ) {
    						$url = add_query_arg(
    							array(
    								'page' => 'account_activation',
    								'key'  => $activation_key,
    							),
    							home_url( '/' )
    						);
    			
    						$signup    = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->base_prefix}signups WHERE activation_key = %s", $activation_key ) );
    						if ( ! $signup->active ) {
    							$username  = $signup->user_login;
    							$recipient = $signup->user_email;
    				
    							$urlparts = parse_url( home_url() );
    							$domain   = $urlparts['host'];
    							$headers  = array(
    								'Content-Type: text/html; charset=UTF-8',
    								'From: ' . html_entity_decode( get_bloginfo( 'name' ), ENT_QUOTES ) . ' <admin@' . $domain . '>',
    							);
    				
    							$subject  = sprintf( esc_html__( 'Activation link for %s', 'forminator' ), $username );
    							$message  = '<p>' . esc_html__( 'To activate your user account, please click the following link:', 'forminator' ) . '</p>';
    							$message .= '<p>' . esc_url_raw( $url ) . '</p>';
    							$message .= '<p>' . esc_html__( 'After you activate, you will receive *another email* with your login.', 'forminator' ) . '</p>';
    				
    							if ( ! empty( $recipient ) && ! empty( $subject ) && ! empty( $message ) ) {
    								$sent = wp_mail( $recipient, $subject, $message, $headers );
    							}
    						}
    					}
    				}
    			}
    		}
    	}
    }

    You can find more information below on how to use mu-plugins below;
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
    https://www.ads-software.com/support/article/must-use-plugins/

    After adding the snippet, you will need to visit the entries/submission page?yourdomain.com/wp-admin/admin.php?page=forminator-entries&form_type=forminator_forms&form_id=3461&paged=1?with an extra parameter?formi_resend_notification.

    So, the final URL should be?yourdomain.com/wp-admin/admin.php?page=forminator-entries&form_type=forminator_forms&form_id=3461&paged=1&formi_resend_notification

    Your form ID will be different, therefore please check and replace 3461 above accordingly. Once page is reloaded you should remove the?formi_resend_notification?parameter from the URL or else it will re-send all the notifications.

    Kind regards,
    Zafer

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @1jd123 ,

    We haven’t heard from you for over 3 weeks now, so it looks like you no longer need our assistance.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Urgent: Unactivated Users’ is closed to new replies.