Skip to content

Node.js based forum software built for the modern web

closes #2195

barisusakli348911fd2d53
diff --git a/public/language/en_GB/global.json b/public/language/en_GB/global.json
index dab7fd1df6..3536cb67f9 100644
--- a/public/language/en_GB/global.json
+++ b/public/language/en_GB/global.json
@@ -94,5 +94,7 @@
"guests": "Guests",
"updated.title": "Forum Updated",
- "updated.message": "This forum has just been updated to the latest version. Click here to refresh the page."
+ "updated.message": "This forum has just been updated to the latest version. Click here to refresh the page.",
+
+ "privacy": "Privacy"
}
diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json
index a2995db1b3..d3c773be98 100644
--- a/public/language/en_GB/user.json
+++ b/public/language/en_GB/user.json
@@ -52,6 +52,7 @@
"settings": "Settings",
"show_email": "Show My Email",
+ "show_fullname": "Show My Fullname",
"digest_label": "Subscribe to Digest",
"digest_description": "Subscribe to email updates for this forum (new notifications and topics) according to a set schedule",
"digest_off": "Off",
diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js
index 4b347e0de1..31d6578ac3 100644
--- a/src/controllers/accounts.js
+++ b/src/controllers/accounts.js
@@ -82,7 +82,7 @@ function getUserDataByUserSlug(userslug, callerUID, callback) {
var self = parseInt(callerUID, 10) === parseInt(userData.uid, 10);
userData.joindate = utils.toISOString(userData.joindate);
- if(userData.lastonline) {
+ if (userData.lastonline) {
userData.lastonline = utils.toISOString(userData.lastonline);
} else {
userData.lastonline = userData.joindate;
@@ -95,13 +95,13 @@ function getUserDataByUserSlug(userslug, callerUID, callback) {
}
if (!(isAdmin || self || (userData.email && userSettings.showemail))) {
- userData.email = "";
+ userData.email = '';
}
- if (self && !userSettings.showemail) {
- userData.emailClass = "";
- } else {
- userData.emailClass = "hide";
+ userData.emailClass = (self && !userSettings.showemail) ? '' : 'hide';
+
+ if (!self && !userSettings.showfullname) {
+ userData.fullname = '';
}
if (isAdmin || self) {
@@ -113,8 +113,8 @@ function getUserDataByUserSlug(userslug, callerUID, callback) {
userData.uid = userData.uid;
userData.yourid = callerUID;
userData.theirid = userData.uid;
- userData.isSelf = parseInt(callerUID, 10) === parseInt(userData.uid, 10);
- userData.showSettings = userData.isSelf || isAdmin;
+ userData.isSelf = self;
+ userData.showSettings = self || isAdmin;
userData.disableSignatures = meta.config.disableSignatures !== undefined && parseInt(meta.config.disableSignatures, 10) === 1;
userData['email:confirmed'] = !!parseInt(userData['email:confirmed'], 10);
userData.profile_links = results.profile_links;
diff --git a/src/user/settings.js b/src/user/settings.js
index a98a050006..0107410b63 100644
--- a/src/user/settings.js
+++ b/src/user/settings.js
@@ -25,6 +25,7 @@ module.exports = function(User) {
settings = data.settings;
settings.showemail = parseInt(settings.showemail, 10) === 1;
+ settings.showfullname = parseInt(settings.showfullname, 10) === 1;
settings.openOutgoingLinksInNewTab = parseInt(settings.openOutgoingLinksInNewTab, 10) === 1;
settings.dailyDigestFreq = settings.dailyDigestFreq || 'off';
settings.usePagination = (settings.usePagination === null || settings.usePagination === undefined) ? parseInt(meta.config.usePagination, 10) === 1 : parseInt(settings.usePagination, 10) === 1;
@@ -77,6 +78,7 @@ module.exports = function(User) {
plugins.fireHook('action:user.saveSettings', {uid: uid, settings: data});
db.setObject('user:' + uid + ':settings', {
showemail: data.showemail,
+ showfullname: data.showfullname,
openOutgoingLinksInNewTab: data.openOutgoingLinksInNewTab,
dailyDigestFreq: data.dailyDigestFreq || 'off',
usePagination: data.usePagination,