Support » Plugin: Loginer - Custom Login Page Builder » Password is missing in Login Details email

  • Hello, I tested this plugin on my experimental site. When I create a new user through the admin panel, the Password is blank in the e-mail called Login Details sent to the user. In this case, the user cannot see his/her own password.

    To fix the problem on my-end, I changed the email template in the public/class-loginer-public.php with WordPress’s default new user email template.
    Here is my solution:

    public function loginer_user_notification_email( $user_email, $user, $blogname ) {
    		$custom_login_page = $this->loginer_plugin_pages_ids( 'Sign in' );
    		$key = get_password_reset_key( $user );
    		if ( is_wp_error( $key ) ) {
    			return;
    		}
    		if ( get_option( LOGINER_CUSTOM_NEW_REGISTRATION_MAIL ) === 'yes' ) {
    			// Create the mail text.
    			/* translators: %s:  blogname */
    			$message  = sprintf( __( "Welcome to %s! Here's your log in credentials:" ), $blogname ) . "\r\n";
    			$message .= get_permalink( $custom_login_page ) . "\r\n";
    			/* translators: %s:  username */
    			$message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
    			$message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n";
    			$message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . "\r\n\r\n";
    			/* translators: %s:  email address */
    			$message .= sprintf( __( 'If you have any problems, please contact at %s.' ), get_option( 'admin_email' ) ) . "\r\n";
    			/* translators: %s:  email address */
    			$user_email['message'] = $message;
    		}
    
    		return $user_email;
    	}

    It seems to work fine this way but still I won’t be using the plugin until you check the solution and update the plugin.

  • The topic ‘Password is missing in Login Details email’ is closed to new replies.