now using global function isUserBlocked(), changed user.logout() to session.logout()
This commit is contained in:
parent
ca46646edd
commit
e4e9e03232
1 changed files with 2 additions and 2 deletions
|
@ -10,9 +10,9 @@ function onRequest() {
|
||||||
res.skinpath = new Array(path.weblog.skins);
|
res.skinpath = new Array(path.weblog.skins);
|
||||||
if (path.weblog && path.weblog.isBlocked())
|
if (path.weblog && path.weblog.isBlocked())
|
||||||
res.redirect(root.href("blocked"));
|
res.redirect(root.href("blocked"));
|
||||||
if (user.isBlocked()) {
|
if (isUserBlocked()) {
|
||||||
// user was blocked recently, so log out
|
// user was blocked recently, so log out
|
||||||
user.logout();
|
session.logout();
|
||||||
res.message = "Your account was blocked!";
|
res.message = "Your account was blocked!";
|
||||||
res.redirect(path.weblog ? path.weblog.href() : root.href());
|
res.redirect(path.weblog ? path.weblog.href() : root.href());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue