mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fixing issue with auth (removed session saving stuff by mistake)
This commit is contained in:
		| @@ -21,7 +21,13 @@ var	config = require('../config.js'), | ||||
| 					return global.socket.emit('user.login', {'status': 0, 'message': 'Incorrect username / password combination.'}); | ||||
| 				} else { | ||||
| 					// Start, replace, or extend a session | ||||
| 					global.uid = uid; | ||||
| 					RDB.get('session:' + user.sessionID, function(session) { | ||||
| 						if (session !== user.sessionID) { | ||||
| 							RDB.set('session:' + user.sessionID, uid, 60*60*24*14);	// Login valid for two weeks | ||||
| 						} else { | ||||
| 							RDB.expire('session:' + user.sessionID, 60*60*24*14);	// Defer expiration to two weeks from now | ||||
| 						} | ||||
| 					}); | ||||
|  | ||||
| 					return global.socket.emit('user.login', {'status': 1, 'message': 'Logged in!'}); | ||||
| 				} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user