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

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

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • 1.3 M2
    • 1.1.2
    • {Unused} APIs
    • None
    • Any
    • email, user, slower, faster, simplest
    • Unit

    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

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

            Dates

              Created:
              Updated:
              Resolved: