//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI;
using CommunityServer.Components;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for UserName.
	/// </summary>
	public class UserName : Control
	{
		public UserName()
		{
			//
			// TODO: Add constructor logic here
			//
		}

        protected override void Render(HtmlTextWriter writer)
        {
            if(Context.Request.IsAuthenticated)
                writer.Write(CSContext.Current.User.Username);
        }

	}
}
