Mailchimp_Helpers::get_user_info()

Get the user info of the user that is connected.

Contents


Return Return

(string) The html of the user info.


Source Source

File: src/integrations/mailchimp/helpers/mailchimp-helpers.php

	public function get_user_info() {
		$user_info = get_option( '_uncannyowl_mailchimp_settings_user_info' );
		$mc_client = $this->get_mailchimp_client();
		ob_start();
		?>
		<?php if ( false !== $user_info && ! empty( $mc_client ) ) : ?>
			<div class="uo-mailchimp-user-info">
				<?php if ( ! empty( $user_info['avatar'] ) ) : ?>
					<div class="uo-mailchimp-user-info__avatar">
						<img width="32" src="<?php echo esc_url( $user_info['avatar'] ); ?>" alt="<?php echo esc_html( $user_info['login_name'] ); ?>" />
					</div>
				<?php endif; ?>
				<div class="uo-mailchimp-user-info__email">
					<?php echo esc_html( $user_info['email'] ); ?>
				</div>
				<div class="uo-mailchimp-user-info__name">
					(<?php echo esc_html( $user_info['login_name'] ); ?>)
				</div>
			</div>
		<?php endif; ?>
		<?php
		return ob_get_clean();
	}