NAnt SDK Documentation - v0.85-nightly-2005-11-09

EnvironmentFunctions.GetUserName Method 

[This is preliminary documentation and subject to change.]

Gets the user name of the person who started the current thread.

[Visual Basic]
<Function(Name:="get-user-name")>
Public Shared Function GetUserName() As String
[C#]
[Function(Name="get-user-name")]
public static string GetUserName();

Return Value

The name of the person logged on to the system who started the current thread.

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.EnvironmentFunctions.GetUserName

Example

Modify the home directory of the current user on unix-based systems.

                
            <exec program="usermod">
                <arg value="-d" />
                <arg value="/home/temp" />
                <arg value="${environment::get-user-name()}" />
            </exec>
                
              

See Also

EnvironmentFunctions Class | NAnt.Core.Functions Namespace