app.user undefined on cold load

v1.18.x
barisusakli 10 years ago
parent c0c85c24cf
commit 76480d4d31

@ -58,7 +58,7 @@ define('forum/topic', [
$(window).trigger('action:topic.loaded'); $(window).trigger('action:topic.loaded');
if (app.user.uid) { if (app.uid) {
socket.emit('topics.enter', tid, function(err, data) { socket.emit('topics.enter', tid, function(err, data) {
if (err) { if (err) {
return app.alertError(err.message); return app.alertError(err.message);

@ -140,7 +140,7 @@ define('forum/topic/posts', [
pids.push(posts[i].pid); pids.push(posts[i].pid);
} }
if (app.user.uid) { if (app.uid) {
socket.emit('posts.getPrivileges', pids, function(err, privileges) { socket.emit('posts.getPrivileges', pids, function(err, privileges) {
if(err) { if(err) {
return app.alertError(err.message); return app.alertError(err.message);

Loading…
Cancel
Save