From: Brad Jorsch Date: Tue, 21 Feb 2017 17:06:41 +0000 (-0500) Subject: API: Add "messagecode" to AuthManager responses X-Git-Tag: 1.31.0-rc.0~4035^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=34ddf8b51a26f01762d0688528ad5de2fba363fd;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ||