Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2088

Add a method to retrieve the e-mail address of a user

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.3 M2
    • Component/s: {Unused} APIs
    • Labels:
      None
    • Environment:
      Any
    • keywords:
      email, user, slower, faster, simplest
    • Tests:
      Unit
    • Similar issues:

      Description

      Which is the simplest way of getting the email address of a wiki user? I know of:

      Solution 1 (slower, but just one line):

      $xwiki.getUserName($someUserName, "$email", false)

      Solution 2 (faster, but 3 lines):

      $userdoc = $xwiki.getDocument($someUserName)
      $userdoc.use("XWiki.XWikiUsers")
      $userdoc.getValue("email")

      I'd preffer:

      Solution 3 (faster and just one line):

      $xwiki.getUserEmail($someUserName)

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              mflorea Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: