remove unnecessary variable

v1.18.x
Baris Usakli 7 years ago
parent 6f29393868
commit 4fdc1b99c6

@ -149,13 +149,12 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
userData.birthday = validator.escape(String(userData.birthday || '')); userData.birthday = validator.escape(String(userData.birthday || ''));
userData.moderationNote = validator.escape(String(userData.moderationNote || '')); userData.moderationNote = validator.escape(String(userData.moderationNote || ''));
var _userDataCoverUrl;
if (userData['cover:url']) { if (userData['cover:url']) {
_userDataCoverUrl = userData['cover:url'].startsWith('http') ? userData['cover:url'] : (nconf.get('relative_path') + userData['cover:url']); userData['cover:url'] = userData['cover:url'].startsWith('http') ? userData['cover:url'] : (nconf.get('relative_path') + userData['cover:url']);
} else { } else {
_userDataCoverUrl = require('../../coverPhoto').getDefaultProfileCover(userData.uid); userData['cover:url'] = require('../../coverPhoto').getDefaultProfileCover(userData.uid);
} }
userData['cover:url'] = _userDataCoverUrl;
userData['cover:position'] = validator.escape(String(userData['cover:position'] || '50% 50%')); userData['cover:position'] = validator.escape(String(userData['cover:position'] || '50% 50%'));
userData['username:disableEdit'] = !userData.isAdmin && parseInt(meta.config['username:disableEdit'], 10) === 1; userData['username:disableEdit'] = !userData.isAdmin && parseInt(meta.config['username:disableEdit'], 10) === 1;
userData['email:disableEdit'] = !userData.isAdmin && parseInt(meta.config['email:disableEdit'], 10) === 1; userData['email:disableEdit'] = !userData.isAdmin && parseInt(meta.config['email:disableEdit'], 10) === 1;

Loading…
Cancel
Save