I don't know what a "5v usb bank fed solenoid" is ?
I'll assume it's a logic controlled solenoid, powered via a USB
connector but not controlled via same.
If the impedence is high enough (say a CMOS gate input) then there
could be some mileage in simply swapping the two component positions
in the PiHut description.
Resistor of 270K or more to the 5V supply, transistor to ground,
output is the junction between them. When dark the sensor draws
nano-amps and the output sees 5V via the resistor, when lit the
sensor should drag the output down to 0.3V by drawing ~20uA.
This is a high impedence circuit which I don't like, easily prey
to noise (electrical not audio) and even a potential for electro-
static damage. I'd ditch whatever the "usb bank" thing is and
go with a bare solenoid and a Darlington pair transistor to drive
it. You can get 8 pairs in a single package fairly easily, or a
single in a standard 3 lead transitor package. You'll still need
a protection diode if it's not already build into the solenoid as
is common with many relay coils these days. Just spotted some
Darlington packages include the protection diode ie ULN2003A #1.
Whatever you choose, breadboard a couple for testing first.