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

Provide an API to check if a reference is an existing user

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Solved By
    • Affects Version/s: 11.10.2
    • Fix Version/s: None
    • Component/s: User
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      AFAIK we currently don't have an API that would allow to check that a given EntityReference or a given Document is a user. Since in XWiki a user is a document containing a XWiki.XWikiUsers object, such an API could be particularly useful first inside XWiki Standard (when checking quickly the number of occurences of XWiki.XWikiUsers in platform you can see that such API would be used in lots of places) but also outside in extensions that needs to work with XWiki Users.

      Note that it could be also part of the XWikiUsers class to have a static method to perform that check, but I guess we want it to be moved in xwiki-platform-user at a point.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                surli Simon Urli
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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