From: Bryan Tong Minh Date: Thu, 29 Jan 2009 19:30:18 +0000 (+0000) Subject: Also return why the target user is not valid X-Git-Tag: 1.31.0-rc.0~43130 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=57d7e2bb88ea98b2bf0510dac0160813c82e8986;p=lhc%2Fweb%2Fwiklou.git Also return why the target user is not valid --- diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index bcec9f7968..a42f435b98 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -57,7 +57,7 @@ class ApiEmailUser extends ApiBase { if ( $targetUser instanceof User ) $result = array( 'result' => 'Enabled' ); else - $result = array( 'result' => 'Disabled' ); + $result = array( 'result' => 'Disabled', 'error' => $targetUser ); $this->getResult()->addValue( null, $this->getModuleName(), $result ); return; @@ -110,7 +110,7 @@ class ApiEmailUser extends ApiBase { 'text' => 'Mail body', 'token' => 'A token previously acquired via prop=info', 'ccme' => 'Send a copy of this mail to me', - 'check' => 'Only check whether the user has email enabled', + 'check' => 'Only check whether email can be sent to the target user', ); }