Da versão < 2.1
editado por Luiz Fernando Casagrande
em 2019/04/24 10:34
Para versão 1.1 >
editado por Luiz Fernando Casagrande
em 2016/11/04 14:04
Comentário da mudança: Install extension [org.xwiki.platform:xwiki-platform-administration-ui-8.3]

Summary

Details

Page properties
Content
... ... @@ -35,15 +35,6 @@
35 35   ## Check if the user exists and has a valid email address configured in his profile
36 36   #set ($userObj = '')
37 37   #set ($userObj = $userDoc.getObject('XWiki.XWikiUsers'))
38 - ## If local user does not exist check global user
39 - #if (!$userObj && ${xcontext.database} != ${xcontext.mainWikiName})
40 - #if ($userName.indexOf('.') != -1)
41 - #set ($userDoc = $xwiki.getDocumentAsAuthor("${xcontext.mainWikiName}:${userName}"))
42 - #else
43 - #set ($userDoc = $xwiki.getDocumentAsAuthor("${xcontext.mainWikiName}:XWiki.${userName}"))
44 - #end
45 - #set ($userObj = $userDoc.getObject('XWiki.XWikiUsers'))
46 - #end
47 47   #if (!$userObj)
48 48  
49 49   {{warning}}$services.localization.render('xe.admin.passwordReset.error.noUser', ["//${escapetool.xml($userName)}//"]){{/warning}}
... ... @@ -68,8 +68,7 @@
68 68   #set ($discard = $verifObj.set('verification', $verifStr))
69 69   #set ($discard = $userDoc.saveAsAuthor($services.localization.render('xe.admin.passwordReset.versionComment'), true))
70 70   ## Compose the verification URL
71 - #set ($userDocRef = $escapetool.url($services.model.serialize($userDoc.documentReference, 'default')))
72 - #set ($passwordResetURL = $xwiki.getDocument("XWiki.ResetPasswordComplete").getExternalURL('view', "u=${userDocRef}&v=${verifStr}"))
62 + #set ($passwordResetURL = $xwiki.getDocument('XWiki.ResetPasswordComplete').getExternalURL('view', "u=${userName}&v=${verifStr}"))
73 73   ## Send the email
74 74   #set ($from = $services.mailsender.configuration.fromAddress)
75 75   #if ("$!from" == '')
... ... @@ -94,7 +94,7 @@
94 94   ## Check for an error constructing the message!
95 95   #if ($services.mailsender.lastError)
96 96   #displayError($exceptiontool.getStackTrace($services.mailsender.lastError))
97 - #else
87 + #else
98 98   ## Send the message and wait for it to be sent or for any error to be raised.
99 99   #set ($mailResult = $services.mailsender.send([$message], 'database'))
100 100   ## Check for errors during the send
© Adsomos Soluções em Softwares para Gestão
Universidade Adsomos - 20.1