From 34ddf8b51a26f01762d0688528ad5de2fba363fd Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 21 Feb 2017 12:06:41 -0500 Subject: [PATCH] API: Add "messagecode" to AuthManager responses Following the same logic that the API uses for assigning codes to warnings and errors. Bug: T158609 Change-Id: I4e1a4f252e12e990727e8e9ada4ea00c526e3f8f --- includes/api/ApiAuthManagerHelper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiAuthManagerHelper.php b/includes/api/ApiAuthManagerHelper.php index 5327d7a99b..d037c365bd 100644 --- a/includes/api/ApiAuthManagerHelper.php +++ b/includes/api/ApiAuthManagerHelper.php @@ -208,6 +208,7 @@ class ApiAuthManagerHelper { $res->status === AuthenticationResponse::RESTART ) { $this->formatMessage( $ret, 'message', $res->message ); + $ret['messagecode'] = ApiMessage::create( $res->message )->getApiCode(); } if ( $res->status === AuthenticationResponse::FAIL || -- 2.20.1