1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| class Utilisateur
{
private $ref,
$civilite,
$nom,
$prenom,
$email,
$mdp,
$date_de_naissance,
$avatar,
$date_inscription,
$nb_connexion,
$derniere_connexion,
$etat,
$bdd;
public function __construct($bdd,$email,$mdp)
{
$this->bdd = $bdd;
$req = $bdd->prepare('SELECT * FROM utilisateur WHERE email=:email AND mdp=:mdp');
$req->execute(array(
'email' => $email,
'mdp' => $mdp
));
if($donnees = $req->fetch()){
$this->ref = donnees['ref'];
$this->civilite = donnees['ref'];
$this->nom = donnees['ref'];
$this->prenom = donnees['ref'];
$this->email = donnees['ref'];
$this->mdp = donnees['ref'];
$this->date_de_naissance = donnees['ref'];
$this->avatar = donnees['ref'];
$this->date_inscription = donnees['ref'];
$this->nb_connexion = donnees['ref'];
$this->derniere_connexion = donnees['ref'];
$this->etat = donnees['ref'];
}
else{
else $this->__destruct();
}
}
} |
Partager