public function update(UserInterface $user) { $req = $this->db->prepare(' UPDATE `camagru_user` SET username = :username, email = :email, password = :password, hash = :hash, active = :active WHERE id = :id '); $req->execute(['id' => $user->getId(), 'username' => $user->getUsername(), 'email' => $user->getEmail(), 'password' => $user->getPassword(), 'hash' => $user->getHash(), 'active' => $user->getActive()]); }
private function send($message, $title, UserInterface $user) { $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf8' . "\r\n"; $headers .= 'To: ' . $user->getUsername() . ' <' . $user->getEmail() . '>' . "\r\n"; $headers .= 'From: Camagru <*****@*****.**>' . "\r\n"; mail($user->getEmail(), '[Camagru] ' . $title, $message, $headers); }