[ 
http://jira.xwiki.org/jira/browse/XWIKI-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergiu Dumitriu closed XWIKI-2088.
----------------------------------

    Fix Version/s: 1.3 M2
                   1.1.3
                   1.2.2
            Tests: [Unit]
       Resolution: Fixed
         Assignee: Sergiu Dumitriu  (was: Marius Dumitru Florea)

Fixed in rev. 7405

Several remarks: At first, I didn't want to commit the patch, as theoretically 
the scriptable APIs should not contain code, but forward calls to a protected 
object. However, com.xpn.xwiki.api.User is not a regular API, as it wraps 
another API class, but a developer API (com.xpn.xwiki.user.api.XWikiUser), and 
changing that is an even worse idea than writing some code in a scriptable API.

In the future, another XWikiUser class should be added somewhere in the model, 
extending BaseObject (thus being usable as an XObject custom class), and the 
User API should forward calls to that class.

> Add a method to retrieve the e-mail address of a user
> -----------------------------------------------------
>
>                 Key: XWIKI-2088
>                 URL: http://jira.xwiki.org/jira/browse/XWIKI-2088
>             Project: XWiki Core
>          Issue Type: New Feature
>          Components: APIs
>    Affects Versions: 1.1.2
>         Environment: Any
>            Reporter: Marius Dumitru Florea
>         Assigned To: Sergiu Dumitriu
>            Priority: Minor
>             Fix For: 1.3 M2, 1.1.3, 1.2.2
>
>         Attachments: XWIKI-2088.diff.txt, XWIKI-2088.diff.txt
>
>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to