public function addUser($user) { $username = $this->db->quote($user['username']); $password = $this->db->quote(Password::encode($user['password'])); $email = $this->db->quote($user['email']); $telephone = $this->db->quote($user['telephone']); $this->db->exec("INSERT INTO users VALUES (NULL, {$username}, {$password}, {$email}, {$telephone}, NOW(), NOW())"); return $this->db->lastInsertId(); }