Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/protocol/ConduitAPIRequest.php
| Show All 32 Lines | final class ConduitAPIRequest { | ||||
| * be available. | * be available. | ||||
| * | * | ||||
| * @return PhabricatorUser Authentic user, available ONLY if the method | * @return PhabricatorUser Authentic user, available ONLY if the method | ||||
| * requires authentication. | * requires authentication. | ||||
| */ | */ | ||||
| public function getUser() { | public function getUser() { | ||||
| if (!$this->user) { | if (!$this->user) { | ||||
| throw new Exception( | throw new Exception( | ||||
| "You can not access the user inside the implementation of a Conduit ". | 'You can not access the user inside the implementation of a Conduit '. | ||||
| "method which does not require authentication (as per ". | 'method which does not require authentication (as per '. | ||||
| "shouldRequireAuthentication())."); | 'shouldRequireAuthentication()).'); | ||||
| } | } | ||||
| return $this->user; | return $this->user; | ||||
| } | } | ||||
| } | } | ||||