company logo

BaseContext :: userName - Get user name from application

In order to provide an application specific user name, the function might be overloaded in the assigned application context (Application::context(sUserName)), or one may set the option variable _USER_NAME.

When the context handle does not refer to a valid context instance the function throws an exception.

Return value:  User name ( odaba::String & )

The user name is the user's login name. In order not to pass any user name, an empty string ( String() )may be passed.

Implementation details

odaba::String BaseContext  :: userName (  )

The function returns the name of the user registered as active user for the process or thread. When no user name has been registered explicitly, the function returns the system user name.