change userid to username
This commit is contained in:
parent
72368475ca
commit
a61caff0ef
1 changed files with 2 additions and 2 deletions
|
|
@ -21,8 +21,8 @@ module.exports.setSessionCookie = setSessionCookie;
|
||||||
// de session. Si ce dernier n'existe pas, on renvoie
|
// de session. Si ce dernier n'existe pas, on renvoie
|
||||||
// l'ID -1.
|
// l'ID -1.
|
||||||
function getUserId(session) {
|
function getUserId(session) {
|
||||||
if (typeof session.userId === 'undefined') return -1;
|
if (typeof session.username === 'undefined') return -1;
|
||||||
return session.userId;
|
return session.username;
|
||||||
}
|
}
|
||||||
module.exports.getUserId = getUserId;
|
module.exports.getUserId = getUserId;
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue