1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

#8754 fix user edit form success/error message cleanup issue (#8764)

* #8754 fix issue with default user role on create, profile navigation issue

* #8754 fix user edit form success/error message cleanup issue
This commit is contained in:
webplusai 2024-11-20 09:10:36 +01:00 committed by GitHub
parent 9f48e75945
commit a697a664fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ exports.handler = function(request,response,state) {
// Clean up any existing error/success messages if the user_id is different from the "$:/temp/mws/user-info/preview-user-id"
var lastPreviewedUser = $tw.wiki.getTiddlerText("$:/temp/mws/user-info/" + user_id + "/preview-user-id");
if(user_id !== lastPreviewedUser) {
if(user_id !== lastPreviewedUser || request.url.includes("preview")) {
$tw.mws.store.adminWiki.deleteTiddler("$:/temp/mws/change-password/" + user_id + "/ error");
$tw.mws.store.adminWiki.deleteTiddler("$:/temp/mws/change-password/" + user_id + "/success");
$tw.mws.store.adminWiki.deleteTiddler("$:/temp/mws/login/error");

View File

@ -23,7 +23,7 @@ title: $:/plugins/tiddlywiki/multiwikiserver/templates/get-users
<$list filter="[<user-list>jsonindexes[]]" variable="user-index">
<$let currentUser={{{ [<user-list>jsonextract<user-index>] }}}>
<$set name="user-id" value={{{ [<currentUser>jsonget[user_id]] }}}>
<a href={{{ [[/admin/users/]addsuffix<user-id>] }}} class="user-item">
<a href={{{ [[/admin/users/]addsuffix<user-id>addsuffix[?q=preview]] }}} class="user-item">
<div class="user-info">
<span class="user-name">
<$text text={{{ [<currentUser>jsonget[username]] }}}/>