문제

"pwresetmsg"라는 사용자 프로필 속성이 있습니다. 해당 속성의 내용은 다음을 표시합니다.

암호는 x 일에 만료됩니다

여기서 x는 사용자가 자신의 광고 암호를 재설정해야 할 때까지 남아있는 일 수입니다.내가하고 싶은 것은이 속성을 노출하여 SharePoint 사이트의 최종 사용자에게 표시 할 수 있도록합니다.이 속성은 매일 아침 업데이트됩니다.

사용자 정의 속성을 최종 사용자에게 노출시키는 쉬운 방법이 있습니까?

도움이 되었습니까?

해결책

여기에 표시하려는 경우 프로필에 표시 할 속성을 구성 할 수 있습니다.

다른 옵션은 사용자 컨트롤을 마스터 페이지 또는 웹 파트에 추가하여 선택한 페이지에 표시하는 것입니다.그런 다음 표시하려는 메시지를 표시하도록 구성 할 수 있습니다.

데이터 액세스는 userProfileManager 및 UserProfile 객체를 통해 수행됩니다

SPServiceContext svcContext = SPServiceContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(svcContext);
UserProfile profile = profileManager.GetUserProfile(accountname);
string resetDays = profile["PWResetMSG"].Value;
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top