compiler.UserInfo
설명
예제
데스크탑 사용자 세부정보 가져오기
MATLAB 명령 프롬프트에 다음을 입력합니다.
user = compiler.UserInfo()
user = UserInfo with properties: UserID: 'someid' DisplayName: <missing> Groups: <missing> Domain: 'SOME_DOMAIN'
서버의 userinfo.json
파일에서 사용자 세부 정보 가져오기
MATLAB Web App Server의 webapps_private
폴더에 userinfo.json
파일을 만듭니다.
{
"version": "1.0.0",
"userInfo.doc": "Property values to be fetched during login from IdP",
"userInfo": {
"UserID": "upn",
"DisplayName": "displayName",
"Groups": "groups",
"LastName": "surname",
"Email": "mail"
},
"appAccess.doc": "Policy for allowing access to user properties within an app or group of apps",
"appAccess": {
"BloodPressure": ["UserID","Email"],
"Mortgage": ["UserID","LastName"],
"Mystery": ["UserID","Email","WebAppsRole","WebAppsDisplayName"]
}
}
compiler.UserInfo
함수를 사용하여 앱을 사용자 지정합니다.function startupFcn(app) try user = compiler.UserInfo(); catch me error(me.message); return end if ~ismissing(user.UserID) % customizing app code end if isprop(user, 'Email') % customizing app code end
출력 인수
user
— 로그인한 사용자 세부정보
compiler.UserInfo
객체
로그인한 사용자 세부정보로, compiler.UserInfo
객체로 반환됩니다.
버전 내역
R2022a에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)