<?php
/*********首页**********/
if(!is_user_logged_in()) {
	wp_redirect(site_url()."/wp-login.php");
	exit;
}
global $current_user,$userdata;
get_currentuserinfo();
?>
<div class="wpuf-author">
	<div class="wpuf-author-inside odd">
		<div class="user_profile">
			<div class="user_photo">
				<?php echo get_avatar( $userdata->user_email, 80 ); ?>
			</div>
			<div class="user_info">
			<ul>
				<li><b>帐号：</b>&nbsp;<?php echo esc_attr( $userdata->user_login ); ?></li>
				<li><b>昵称：</b>&nbsp;<?php echo esc_attr( $userdata->nickname ) ?></li>
				<li><b>邮箱：</b>&nbsp;<?php echo esc_attr( $userdata->user_email ) ?></li>
			</ul>
			<ul>
				<li><b>文章：</b>&nbsp; <?php echo count_user_posts( $userdata->ID ); ?>  &nbsp;篇</li>
				<li><b>评论：</b>&nbsp;<?php echo get_user_comments_count($userdata->ID);?>&nbsp;次</li>
				<li><b>收藏：</b>&nbsp;<?php echo get_user_fav_count($userdata->ID);?>&nbsp;个</li>
			</ul>
			</div>						
		</div>
		<div class="user_desc">
			<h6>个人简介</h6>
			<p><?php echo $userdata->description; ?></p>
		</div>
		
	</div>
</div>