API: Some cleanup
[lhc/web/wiklou.git] / includes / api / ApiLogin.php
index 24a1314..b197c20 100644 (file)
@@ -82,7 +82,7 @@ class ApiLogin extends ApiBase {
                                wfRunHooks('UserLoginComplete', array(&$wgUser, &$injected_html));
 
                                $result['result'] = 'Success';
-                               $result['lguserid'] = $wgUser->getId();
+                               $result['lguserid'] = intval($wgUser->getId());
                                $result['lgusername'] = $wgUser->getName();
                                $result['lgtoken'] = $wgUser->getToken();
                                $result['cookieprefix'] = $wgCookiePrefix;
@@ -114,7 +114,7 @@ class ApiLogin extends ApiBase {
                        case LoginForm :: THROTTLED :
                                global $wgPasswordAttemptThrottle;
                                $result['result'] = 'Throttled';
-                               $result['wait'] = $wgPasswordAttemptThrottle['seconds'];
+                               $result['wait'] = intval($wgPasswordAttemptThrottle['seconds']);
                                break;
                        default :
                                ApiBase :: dieDebug(__METHOD__, "Unhandled case value: {$authRes}");