Merge "Special:PagesWithProp: Distinguish content from interface"
[lhc/web/wiklou.git] / resources / mediawiki / mediawiki.user.js
index e8366a5..7cf9d8f 100644 (file)
                        return id;
                },
 
+               /**
+                * Gets the current user's database id.
+                *
+                * Not to be confused with #id
+                *
+                * @return {number} Current user's id, or 0 if user is anonymous
+                */
+               getId: function () {
+                       return mw.config.get( 'wgUserId', 0 );
+               },
+
                /**
                 * Gets the current user's name.
                 *
-                * @return {string|null} User name string or null if users is anonymous
+                * @return {string|null} User name string or null if user is anonymous
                 */
                getName: function () {
                        return mw.config.get( 'wgUserName' );
                /**
                 * Gets the current user's name or the session ID
                 *
+                * Not to be confused with #getId
+                *
                 * @return {string} User name or random session ID
                 */
                id: function () {