aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src
diff options
context:
space:
mode:
Diffstat (limited to 'resources/src')
-rw-r--r--resources/src/mediawiki.page.ready/ready.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/resources/src/mediawiki.page.ready/ready.js b/resources/src/mediawiki.page.ready/ready.js
index 9a778917a5f5..94617994c41e 100644
--- a/resources/src/mediawiki.page.ready/ready.js
+++ b/resources/src/mediawiki.page.ready/ready.js
@@ -192,6 +192,13 @@ $( () => {
{ tag: 'logout', autoHide: false }
);
var api = new mw.Api();
+ if ( mw.user.isTemp() ) {
+ // Indicate to the success page that the user was previously a temporary account, so that the success
+ // message can be customised appropriately.
+ const url = new URL( href );
+ url.searchParams.append( 'wasTempUser', 1 );
+ href = url;
+ }
api.postWithToken( 'csrf', {
action: 'logout'
} ).then(