ActivEarth.DAO.UserDAO.GetUserFromUserName C# (CSharp) Method

GetUserFromUserName() public static method

public static GetUserFromUserName ( string userName ) : UserDataProvider
userName string
return ActivEarth.Server.Service.UserDataProvider
        public static UserDataProvider GetUserFromUserName(string userName)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return data.UserDataProviders.FirstOrDefault(u => u.user_name == userName);
            }
        }