mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
Merge remote-tracking branch 'origin'
This commit is contained in:
@@ -128,7 +128,14 @@ passport.deserializeUser(function(uid, done) {
|
||||
|
||||
for (var i=0, ii=routes.length; i<ii; i++) {
|
||||
(function(route) {
|
||||
|
||||
app.get('/' + route, function(req, res) {
|
||||
|
||||
if ((route === 'login' || route ==='register') && (req.user && req.user.uid > 0)) {
|
||||
res.redirect('/account');
|
||||
return;
|
||||
}
|
||||
|
||||
res.send(templates['header'] + '<script>templates.ready(function(){ajaxify.go("' + route + '");});</script>' + templates['footer']);
|
||||
});
|
||||
}(routes[i]));
|
||||
|
||||
Reference in New Issue
Block a user