Hi Stéphanie,

alternatively, you can try using the more classic XWiki way - I think
something like this should work :

#set($usrDoc = $xwiki.getDocument($context.user))
#set($usrObj = $usrDoc.getObject('XWiki.XWikiUsers'))
#set($emailProp = $usrObj.get('email').value)
$emailProp

Guillaume

2012/1/3 Stéphanie <stephanie.roull...@gmail.com>

> Hello,
>
> Happy new year to everyone.
>
> I'm trying to have the email of an user and I want to put it on every
> document the user creates.
>
> For that, I try this two differents codes :
>
> #set($mail=$xwiki.getUser($doc.getCreator(), false).getEmail())
>
> and an other try :
>
> #set($user=$xwiki.getUser($doc.getCreator(), false))
> #set($mail=$user.getEmail())
>
> But none of this two codes is right. What should I do to have the email of
> my user ?
>
> Best regards,
> Stéphanie
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Find-the-email-of-a-user-tp7146566p7146566.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Guillaume Lerouge
Sales - XWiki SAS
Skype: wikibc
Office: +33 1 45 42 40 90
Mobile: +33 6 10 79 76 70
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to