In pinhole camera, the pinhole serves as a lens.
Hence, the statement is true.
A pinhole camera consists of a lens.