Skip to content
Snippets Groups Projects
Commit 833542c5 authored by deuce's avatar deuce
Browse files

Don't throw errors when there's no ecweb ini section or user

number.
parent 5a23837a
No related branches found
No related tags found
No related merge requests found
......@@ -25,11 +25,15 @@ var webIni=(function() {
function setLoginCookie(u, sessionKey)
{
set_cookie('synchronet', u.number.toString() + ',' + sessionKey, time() + webIni.sessionTimeout, http_request.host.replace(/\:\d*/g, ""), "/");
login(u.alias, u.security.password);
if(u.number) {
set_cookie('synchronet', u.number.toString() + ',' + sessionKey, time() + webIni.sessionTimeout, http_request.host.replace(/\:\d*/g, ""), "/");
login(u.alias, u.security.password);
}
}
var webIni = get_mod_options("ecweb");
if(webIni==null)
webIni={};
var f = new File(file_cfgname(system.ctrl_dir,'sbbs.ini'));
f.open("r");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment