From b393835bda6c6359dee4dfa5004d24319af262a3 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 10 Oct 2013 10:54:08 -0400 Subject: API: Handle "special" options in action=options There are certain preferences, such as realname and emailaddress, that are handled specially in Special:Preferences and are not accessible by User::getOptions or User::setOptions. But action=options was allowing a 'dummy' version to be set in User::setOptions. Change-Id: I4c1b3d8e1eae9520228d7b6da9c41ada80f7c387 --- includes/api/ApiOptions.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'includes/api/ApiOptions.php') diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index b5aec7716a76..c9d63784e02f 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -99,6 +99,9 @@ class ApiOptions extends ApiBase { $validation = true; } break; + case 'special': + $validation = "cannot be set by this module"; + break; case 'unused': default: $validation = "not a valid preference"; -- cgit v1.2.3