Login #1
							
								
								
									
										25
									
								
								User.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								User.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					require_once("BancaDati/BancaDati.php");
 | 
				
			||||||
 | 
					use BancaDati\BancaDati;
 | 
				
			||||||
 | 
					class User {
 | 
				
			||||||
 | 
					    public string $username;
 | 
				
			||||||
 | 
					    public string $email;
 | 
				
			||||||
 | 
					    public string $token;
 | 
				
			||||||
 | 
					    private string $password;
 | 
				
			||||||
 | 
					    private BancaDati $db;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function __construct(string $username) {
 | 
				
			||||||
 | 
					        $this->username = $username;
 | 
				
			||||||
 | 
					        $db = new BancaDati();
 | 
				
			||||||
 | 
					        return $this;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function exists() {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public function login(string $password) : string {
 | 
				
			||||||
 | 
					        // select user
 | 
				
			||||||
 | 
					        // $this->db->select()
 | 
				
			||||||
 | 
					        return "token";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user