Fix auth in User class
This commit is contained in:
		@ -74,11 +74,11 @@
 | 
				
			|||||||
				return false;
 | 
									return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$until = time() + self::$tokenLifetime;
 | 
								$until = time() + self::$tokenLifetime;
 | 
				
			||||||
			$hash = hash('sha256', $login.'|'.$password.'|'.$until.'|'.self::$secret);
 | 
								$hash = hash('sha256', $login.'|'.$user->password.'|'.$until.'|'.self::$secret);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			self::updateOnline($login);
 | 
								self::updateOnline($login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			return implode('|', rtrim(strtr(base64_encode($login.'|'.$password.'|'.$until.'|'.$hash), '+/', '-_'), '='));
 | 
								return rtrim(strtr(base64_encode($login.'|'.$user->password.'|'.$until.'|'.$hash), '+/', '-_'), '=');
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public static function get($login) {
 | 
							public static function get($login) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user