mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-10-31 12:00:19 -04:00 
			
		
		
		
	Fix #6 - compatibility issues
This commit is contained in:
		
							parent
							
								
									195d91c28e
								
							
						
					
					
						commit
						ffd2b58f0c
					
				| @ -11,7 +11,7 @@ class Token | ||||
|    * @param timestamp $expire expiration time | ||||
|    * @return String token | ||||
|    */ | ||||
|   public static function new($id, $data, $expire) | ||||
|   public static function add($id, $data, $expire) | ||||
|   { | ||||
|     global $mysqli; | ||||
|     $salt = uniqid(mt_rand(), true); | ||||
|  | ||||
| @ -251,7 +251,7 @@ class User | ||||
|             if (isset($_POST['remember'])&&$_POST['remember']) | ||||
|             { | ||||
|               $year = strtotime('+356 days', time()); | ||||
|               $token = Token::new($id, 'remember', $year); | ||||
|               $token = Token::add($id, 'remember', $year); | ||||
|               setcookie('token', $token, $year, "/"); | ||||
|               setcookie('user', $id, $year, "/"); | ||||
|             } | ||||
| @ -283,7 +283,7 @@ class User | ||||
|       $year = strtotime('+356 days', time()); | ||||
|       unset($_COOKIE['token']); | ||||
|       $_SESSION['user'] = $id; | ||||
|       $token = Token::new($id, 'remember', $year); | ||||
|       $token = Token::add($id, 'remember', $year); | ||||
|       setcookie('token', $token, $year); | ||||
|     } | ||||
|     else | ||||
| @ -482,7 +482,7 @@ class User | ||||
|     $id = $query->fetch_assoc()['id'];     | ||||
|     $time = strtotime('+1 day', time()); | ||||
| 
 | ||||
|     $token = Token::new($id, 'passwd', $time); | ||||
|     $token = Token::add($id, 'passwd', $time); | ||||
| 
 | ||||
|     $link = WEB_URL."/admin/?do=lost-password&id=$id&token=$token"; | ||||
|     $to      = $email; | ||||
| @ -507,7 +507,7 @@ class User | ||||
|     $time = strtotime('+1 day', time()); | ||||
|     $id = $this->id; | ||||
| 
 | ||||
|     $token = Token::new($id, 'email;$email', $time); | ||||
|     $token = Token::add($id, 'email;$email', $time); | ||||
| 
 | ||||
| 
 | ||||
|     $link = WEB_URL."/admin/?do=change-email&id=$id&token=$token"; | ||||
|  | ||||
| @ -83,7 +83,8 @@ if(isset($_POST['server']) && empty($message)) | ||||
| 	$array = explode(";", $sql); | ||||
| 	 | ||||
| 	foreach ($array as $value) { | ||||
| 		if (empty(trim($value))) | ||||
| 		$val = trim($value); | ||||
| 		if (empty($val)) | ||||
| 		{ | ||||
| 			continue; | ||||
| 		} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user