Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sessions are now being set for users
  • Loading branch information
Brian Martin committed Nov 18, 2012
1 parent a422381 commit bd4f2c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion core/cliste/index.js
@@ -1,5 +1,5 @@
/*jslint devel: false, browser: true, maxerr: 50, indent: 4*/
/*global module: false, $: false, jQuery: false, console: false, document: false, event: false, frames: false, history: false, Image: false, location: false, name: false, navigator: false, Option: false, parent: false, screen: false, setInterval: false, setTimeout: false, window: false, XMLHttpRequest: false */
/*global global: false, module: false, $: false, jQuery: false, console: false, document: false, event: false, frames: false, history: false, Image: false, location: false, name: false, navigator: false, Option: false, parent: false, screen: false, setInterval: false, setTimeout: false, window: false, XMLHttpRequest: false */

/**
* @description
Expand Down Expand Up @@ -57,6 +57,11 @@
return headers;
};

cliste.setCookie = function (cookie) {
global.cliste.core.cliste.setHeader({
'Set-Cookie': cookie
});
};
/**
* Return the admin module to the global scope
*/
Expand Down
2 changes: 2 additions & 0 deletions core/user/index.js
Expand Up @@ -99,6 +99,8 @@
'expires': Date.now() + 1209600000
});

global.cliste.core.cliste.setCookie('SESSION=' + session);

currentUser = user[0];

global.cliste.core.theme.updateModel('login', currentUser);
Expand Down
2 changes: 1 addition & 1 deletion sites/default/settings.js
@@ -1,6 +1,6 @@
module.exports = {
'base': process.cwd(),
'theme': 'bootstrap',
'domain': 'clistecms.com',
'domain': 'localhost',
'port': 8888
};

0 comments on commit bd4f2c4

Please sign in to comment.