System.getUserName (ユーザ名取得)

  1. 文法
  2. 詳細
  3. 引数
  4. 例外
  5. 戻り値

1. 文法

メンバ型
静的関数
メンバ所有者
global.System (static)
呼び出し
global.System.getUserName( type )

2. 詳細

呼び出し側スレッドと結び付いている、ユーザーなどのセキュリティプリンシパルの名前を取得します。スレッドがクライアントを装っているときは、そのクライアントの名前が得られます。

3. 引数

type (Integer) [default: tpunSamCompatible]
取得する名前の形式を指定します。
tpunFullyQualifiedDN
完全修飾ドメイン名です。CN=Your Name, OU=OrgUnit2, OU=OrgUnit1, O=Organization, C=Countryの形式です。
tpunSamCompatible
ローカル及びNTLM認証に則したフォーマットです。OrgUnit1\YourNameの形式です。
tpunDisplay
ユーザ名のみです。Your Nameの形式です。
tpunUniqueId
文字列化されたGUID(UUID)です。{ec9abe4e-fead-468e-9dfc-d3033c210602}の形式です。
tpunCanonical
orgunit1.organization.com/orgunit2/Your Nameの形式です。
tpunUserPrincipal
ユーザ名とFQDNを@で結合したもの(UPN表記)です。yourname@organization.comの形式です。
tpunCanonicalEx
orgunit1.organization.com/orgunit2\nYour Nameの形式です。
tpunServicePrincipal
www/srv.orgunit1.com/orgunit1.comの形式です。
tpunDnsDomain
DNSドメイン名とユーザ名を\で結合したものです。orgunit1.organization.com\YourNameの形式です。

4. 例外

5. 戻り値

ユーザ名を文字列で返します。