mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-15 09:04:36 +02:00
* Login count property for users
This commit is contained in:
parent
a15067fc21
commit
e34f0ad688
1 changed files with 11 additions and 0 deletions
|
@ -39,6 +39,17 @@ function login(callingMenu, formData, extraArgs) {
|
||||||
callback(err);
|
callback(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
function updateUserLoginCount(callback) {
|
||||||
|
if(!user.properties.login_count) {
|
||||||
|
user.properties.login_count = 1;
|
||||||
|
} else {
|
||||||
|
user.properties.login_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
user.persistProperty('login_count', user.properties.login_count, function persisted(err) {
|
||||||
|
callback(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
function recordLoginHistory(callback) {
|
function recordLoginHistory(callback) {
|
||||||
|
|
||||||
userDb.serialize(function serialized() {
|
userDb.serialize(function serialized() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue