Beispiel #1
0
 public function update(UserInterface $user)
 {
     $req = $this->db->prepare('
         UPDATE `matcha_user` SET
             username = :username,
             email = :email,
             password = :password,
             hash = :hash,
             active = :active
         WHERE id = :id
     ');
     $user->setHash($user->getHash());
     $req->execute(['id' => $user->getId(), 'username' => $user->getUsername(), 'email' => $user->getEmail(), 'password' => $user->getPassword(), 'hash' => $user->getHash(), 'active' => $user->getActive()]);
 }