nerdexam
Microsoft

70-489 · Question #97

You develop a Web Part that includes the following code segment (Line numbers are included for reference only.) You log on to a SharePoint site with the user name Contoso\THartono. You need to…

The correct answer is B. Option B. // Get user properties for the target user. // To get the PersonProperties object for the current user, use the // getMyProperties method. personProperties = peopleManager.getMyProperties(targetUser);

Design and develop advanced Microsoft SharePoint 2013 solutions

Question

You develop a Web Part that includes the following code segment (Line numbers are included for reference only.) You log on to a SharePoint site with the user name Contoso\THartono. You need to display account details for the currently logged in user. Which code segment should you insert at line 13?

Exhibits

70-489 question #97 exhibit 1
70-489 question #97 exhibit 2

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D

How the community answered

(55 responses)
  • A
    5% (3)
  • B
    84% (46)
  • C
    2% (1)
  • D
    9% (5)

Explanation

// Get user properties for the target user. // To get the PersonProperties object for the current user, use the // getMyProperties method. personProperties = peopleManager.getMyProperties(targetUser);

Topics

#Web Part development#user context#SPContext#current user identity

Community Discussion

No community discussion yet for this question.

Full 70-489 Practice