Skip to content

Commit

Permalink
#8754 fix user edit form success/error message cleanup issue (#8764)
Browse files Browse the repository at this point in the history
* #8754 fix issue with default user role on create, profile navigation issue

* #8754 fix user edit form success/error message cleanup issue
  • Loading branch information
webplusai authored Nov 20, 2024
1 parent 9f48e75 commit a697a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion plugins/tiddlywiki/multiwikiserver/templates/get-users.tid
Original file line number Diff line number Diff line change
Expand Up @@ -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]] }}}/>
Expand Down

0 comments on commit a697a66

Please sign in to comment.