getPublicKey() expected the userID from the user from whom we want the key. $this->userId holds the user who does the operation while $this->keyId holds the key we want to use.

For example if you publicly access DeepDiver/file/foo.txt than $this->userId will be "DeepDiver" and $this->keyId will be the ID of the public share key