v1.18.x
barisusakli 9 years ago
parent 3648d531fa
commit 18e68346e7

@ -306,6 +306,8 @@ authenticationController.logout = function(req, res, next) {
} }
req.logout(); req.logout();
user.setUserField(uid, 'lastonline', Date.now() - 300000);
// action:user.loggedOut deprecated in > v0.9.3 // action:user.loggedOut deprecated in > v0.9.3
plugins.fireHook('action:user.loggedOut', {req: req, res: res, uid: uid}); plugins.fireHook('action:user.loggedOut', {req: req, res: res, uid: uid});
plugins.fireHook('static:user.loggedOut', {req: req, res: res, uid: uid}, function() { plugins.fireHook('static:user.loggedOut', {req: req, res: res, uid: uid}, function() {

@ -1,10 +1,10 @@
'use strict'; 'use strict';
var async = require('async'), var async = require('async');
winston = require('winston'), var winston = require('winston');
db = require('../database'), var db = require('../database');
meta = require('../meta'), var meta = require('../meta');
events = require('../events'); var events = require('../events');
module.exports = function(User) { module.exports = function(User) {
User.auth = {}; User.auth = {};

Loading…
Cancel
Save