API: Add "messagecode" to AuthManager responses
[lhc/web/wiklou.git] / includes / api / ApiAuthManagerHelper.php
index 5327d7a..d037c36 100644 (file)
@@ -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 ||