v1.18.x
Baris Soner Usakli 12 years ago
parent 21efda4a84
commit 6be5bcc4c8

@ -17,8 +17,10 @@
<script type="text/javascript" src="{relative_path}/src/app.js"></script>
<script type="text/javascript" src="{relative_path}/src/templates.js"></script>
<script type="text/javascript" src="{relative_path}/src/ajaxify.js"></script>
<script src="{relative_path}/vendor/jquery/js/jquery.timeago.js"></script>
<script src="{relative_path}/vendor/requirejs/require.js"></script>
<script src="{relative_path}/vendor/bootbox/bootbox.min.js"></script>
<script>
require.config({
baseUrl: "{relative_path}/src/modules",

@ -8,7 +8,7 @@
"admin/index[^]*": "admin/index",
"admin/themes[^]*": "admin/themes",
"admin/plugins[^]*": "admin/plugins",
"admin/settings[^]*": "admin/settings",
"^admin/settings[^]*": "admin/settings",
"admin/twitter[^]*": "admin/twitter",
"admin/facebook[^]*": "admin/facebook",
"admin/gplus[^]*": "admin/gplus",

@ -332,12 +332,14 @@ var user = require('./../user.js'),
return;
}
if (uid !== callerUID || callerUID === '0') {
if (uid != callerUID || callerUID == '0') {
res.json(403, {
error: 'Not allowed!'
});
return;
}
user.getUserFields(uid, ['username', 'userslug', 'showemail'], function(err, userData) {
if (err)
return next(err);
@ -368,7 +370,7 @@ var user = require('./../user.js'),
return;
}
if (uid !== callerUID || callerUID === '0') {
if (uid != callerUID || callerUID == '0') {
res.json(403, {
error: 'Not allowed!'
});
@ -491,13 +493,13 @@ var user = require('./../user.js'),
}
function canSeeEmail() {
return callerUID === uid || (data.email && (data.showemail && data.showemail === "1"));
return callerUID == uid || (data.email && (data.showemail && data.showemail === "1"));
}
if (!canSeeEmail())
data.email = "";
if (callerUID === uid && (!data.showemail || data.showemail === "0"))
if (callerUID == uid && (!data.showemail || data.showemail === "0"))
data.emailClass = "";
else
data.emailClass = "hide";

Loading…
Cancel
Save