mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fixed the rest of the bugs that arised from the redis refactor
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/user.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/user.js
									
									
									
									
									
								
							| @@ -431,8 +431,15 @@ var	config = require('../config.js'), | ||||
| 		// Start, replace, or extend a session | ||||
| 		RDB.get('sess:' + sessionID, function(err, session) { | ||||
| 			RDB.handle(err); | ||||
| 			RDB.set('sess:' + sessionID + ':uid', uid, 60*60*24*14);	// Login valid for two weeks | ||||
| 			RDB.set('uid:' + uid + ':session', sessionID, 60*60*24*14); | ||||
|  | ||||
| 			var expiry = 60*60*24*14, // Login valid for two weeks | ||||
| 				sess_key = 'sess:' + sessionID + ':uid', | ||||
| 				uid_key = 'uid:' + uid + ':session'; | ||||
|  | ||||
| 			RDB.set(sess_key, uid); | ||||
| 			RDB.expire(sess_key, expiry); | ||||
| 			RDB.set(uid_key, sessionID); | ||||
| 			RDB.expire(uid_key, expiry); | ||||
| 		}); | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user