mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 01:49:01 +02:00
closes #2195
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user