wordpress user profile page

Create a file called author.php and place the code below in it. Save that file in your themes folder. The themes folder is located at yoursite.com/wp-content/themes/themename

<?php include_once('header.php'); ?>
<div id="container">
<div class="content">
<?php 
        $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); 
        ?>
        <div id="author-contact-info">
        <h2>Information about: <?php echo $curauth->nickname; ?></h2>
        <ul>
        <li>First Name: <?php echo $curauth->user_firstname; ?></li>
        <li>Last Name: <?php echo $curauth->user_lastname; ?></li>
        <li>Email: <?php echo $curauth->user_email; ?></li>
        <li>Website: <?php echo $curauth->user_url; ?></li>
        <li>Description: <?php echo $curauth->user_description; ?></li>   
        </ul>
        </div>
        <?php if ( have_posts() ) ?>
        <h2>Posts by: <?php echo $curauth->nickname; ?></h2>
            <ul>
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                <li>
                    <a href="https://wordpress.stackexchange.com/questions/106985/<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
                    <?php the_title(); ?></a>,
                    <?php the_time('d M Y'); ?> in <?php the_category('&');?>
                </li>
            <?php endwhile; else: ?>
                <h2><?php _e('No posts by this user.'); ?></h2>
            <?php endif; ?>
            </ul>
    <?php
        $args = array(
            'user_id' => $curauth->ID,
            'number' => 10, // how many comments to retrieve
            'status' => 'approve'
            );

        $comments = get_comments( $args );

        if ( $comments )
        {
        echo '<h2>Comments by: '.$curauth->nickname.'</h2>'; 
            $output.= "<ul>";
            foreach ( $comments as $c )
            {
            $output.= '<li>';
            $output.= '<a href="'.get_comment_link( $c->comment_ID ).'">';
            $output.= get_the_title($c->comment_post_ID);
            $output.= '</a>';
            $output.= "</li>\n";
            }
            $output.= '</ul>';

            echo $output;
        } else { 
            echo "<h2>This user has no comments.</h2>";
        }
?>
</div>
</div>
<?php include_once('footer.php'); ?>