代码之家  ›  专栏  ›  技术社区  ›  Eton B.

在SharePoint中检索用户名?

  •  2
  • Eton B.  · 技术社区  · 14 年前

    SharePoint如何检索右上角显示的用户的实际名称?例如 Welcome John Smith

    我需要在XSL编辑器中将此名称作为自定义代码的变量或参数来调用,但我不知道如何检索它,它是全局变量吗?

    4 回复  |  直到 13 年前
        1
  •  1
  •   Kit Menke    14 年前

    LOGON_USER

    1. UserContextFilterWebPart
    2. GetUserInfo
      • http://server/sites/SiteCollection/SubSite/_vti_bin/UserGroup.asmx?WSDL
        2
  •  1
  •   dah97765    13 年前

    function getCurrentUsersName(){
    var firstName = $().SPServices.SPGetCurrentUser({
        fieldName: "FirstName",
        debug: false
    });
    return firstName;
    }
    
    function getCurrentUsersLastName(){
    var lastName = $().SPServices.SPGetCurrentUser({
        fieldName: "LastName",
        debug: false
    });
    return lastName;
    }
    

    here

        3
  •  0
  •   Adam    14 年前

        4
  •  0
  •   Ian    14 年前