UserNameList (NotesSession - JavaScript)

Read-only. The name of the user or server that created the session, and the alternate name if it exists.

Defined in

NotesSession

Syntax

getUserNameList() : java.util.Vector

Usage

If the user does not have an alternate name, this method returns a vector of one element containing the user name. If the user does have an alternate name, this method returns a vector of two elements containing the user name and the alternate user name.

Examples

This computed field displays the common user name plus any alternate name.
var ulist = session.getUserNameList();
var primary:NotesName = ulist.firstElement();
var out = primary.getCommon();
if (ulist.size > 1) {
	var secondary:NotesName = ulist.lastElement();
	out = out + " (" + secondary.getCommon() + ")"
}
return out;