Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/conduit/UserEnableConduitAPIMethod.php
<?php | <?php | ||||
final class UserEnableConduitAPIMethod extends UserConduitAPIMethod { | final class UserEnableConduitAPIMethod extends UserConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'user.enable'; | return 'user.enable'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Re-enable specified users (admin only).'; | return 'Re-enable specified users (admin only).'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'phids' => 'required list<phid>', | 'phids' => 'required list<phid>', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'void'; | return 'void'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-PERMISSIONS' => 'Only admins can call this method.', | 'ERR-PERMISSIONS' => 'Only admins can call this method.', | ||||
'ERR-BAD-PHID' => 'Non existent user PHID.', | 'ERR-BAD-PHID' => 'Non existent user PHID.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$actor = $request->getUser(); | $actor = $request->getUser(); | ||||
Show All 22 Lines |