Wiki source code of UpdateWikiUser
Last modified by superadmin on 2025/05/22 17:45
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | #if($services.csrf.isTokenValid($request.form_token)) | ||
| 3 | #set($userConfRef = $services.model.createDocumentReference('', 'WikiManager', 'WikiUserConfiguration')) | ||
| 4 | #set($userConfDoc = $xwiki.getDocument($userConfRef)) | ||
| 5 | #set($discard = $userConfDoc.updateObjectFromRequest("WikiManager.WikiUserClass")) | ||
| 6 | #set($discard = $userConfDoc.save()) | ||
| 7 | #if($request.xredirect) | ||
| 8 | $response.sendRedirect($request.xredirect) | ||
| 9 | #end | ||
| 10 | #elseif("$!request.form_token" != '') | ||
| 11 | |||
| 12 | {{warning}} | ||
| 13 | {{translation key="platform.wiki.csrf.error" /}} | ||
| 14 | {{/warning}} | ||
| 15 | |||
| 16 | #else | ||
| 17 | Updates the wiki user configuration by using values from the request. | ||
| 18 | |||
| 19 | The 'xredirect' parameter is also accepted, currently used in the administration section of a wiki. | ||
| 20 | #end | ||
| 21 | {{/velocity}} |