Details
-
New Feature
-
Resolution: Fixed
-
Minor
-
1.1.2
-
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)