summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/mediawiki/mediawiki.user.js20
1 files changed, 3 insertions, 17 deletions
diff --git a/resources/mediawiki/mediawiki.user.js b/resources/mediawiki/mediawiki.user.js
index 5c5c87e2..e64d2e84 100644
--- a/resources/mediawiki/mediawiki.user.js
+++ b/resources/mediawiki/mediawiki.user.js
@@ -122,30 +122,16 @@
};
/**
- * Gets the current user's name or a random ID automatically generated and kept in a cookie.
- *
- * This ID is persistent for anonymous users, staying in their browser up to 1 year. The
- * expiration time is reset each time the ID is queried, so in most cases this ID will
- * persist until the browser's cookies are cleared or the user doesn't visit for 1 year.
+ * Gets the current user's name or the session ID
*
* @return String: User name or random session ID
*/
this.id = function() {
- var id,
- name = user.getName();
+ var name = user.getName();
if ( name ) {
return name;
}
- id = $.cookie( 'mediaWiki.user.id' );
- if ( typeof id === 'undefined' || id === null ) {
- id = generateId();
- }
- // Set cookie if not set, or renew it if already set
- $.cookie( 'mediaWiki.user.id', id, {
- expires: 365,
- path: '/'
- } );
- return id;
+ return user.sessionId();
};
/**