* Login count property for users
This commit is contained in:
parent
a15067fc21
commit
e34f0ad688
|
@ -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…
Reference in New Issue