summaryrefslogtreecommitdiff
path: root/includes/api/ApiEmailUser.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiEmailUser.php')
-rw-r--r--includes/api/ApiEmailUser.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php
index d9eed60c..4fa03434 100644
--- a/includes/api/ApiEmailUser.php
+++ b/includes/api/ApiEmailUser.php
@@ -55,7 +55,7 @@ class ApiEmailUser extends ApiBase {
'Subject' => $params['subject'],
'CCMe' => $params['ccme'],
);
- $retval = SpecialEmailUser::submit( $data );
+ $retval = SpecialEmailUser::submit( $data, $this->getContext() );
if ( $retval instanceof Status ) {
// SpecialEmailUser sometimes returns a status
@@ -98,7 +98,10 @@ class ApiEmailUser extends ApiBase {
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
),
- 'token' => null,
+ 'token' => array(
+ ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_REQUIRED => true
+ ),
'ccme' => false,
);
}
@@ -113,6 +116,23 @@ class ApiEmailUser extends ApiBase {
);
}
+ public function getResultProperties() {
+ return array(
+ '' => array(
+ 'result' => array(
+ ApiBase::PROP_TYPE => array(
+ 'Success',
+ 'Failure'
+ ),
+ ),
+ 'message' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ )
+ )
+ );
+ }
+
public function getDescription() {
return 'Email a user.';
}