From 57d7e2bb88ea98b2bf0510dac0160813c82e8986 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Thu, 29 Jan 2009 19:30:18 +0000 Subject: [PATCH] Also return why the target user is not valid --- includes/api/ApiEmailUser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', ); } -- 2.20.1