diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-10-02 02:05:15 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-10-02 02:05:15 +0300 |
commit | 9aa0f137f5a389905143b6698da0de4c59b03fe6 (patch) | |
tree | 899ecda167d9cff8c16eaacdcce3b1681a9634bf /plugins/UsersManager/API.php | |
parent | 5c4c150ce0d8c21f8914b37d2cb94ea5bcc3d9f9 (diff) |
Improve parameter handling in UsersManager.getUsers (#13515)
Diffstat (limited to 'plugins/UsersManager/API.php')
-rw-r--r-- | plugins/UsersManager/API.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php index c5c636d3b9..78bff1b43f 100644 --- a/plugins/UsersManager/API.php +++ b/plugins/UsersManager/API.php @@ -343,7 +343,12 @@ class API extends \Piwik\Plugin\API { Piwik::checkUserHasSomeAdminAccess(); + if (!is_string($userLogins)) { + throw new \Exception('Parameter userLogins needs to be a string containing a comma separated list of users'); + } + $logins = array(); + if (!empty($userLogins)) { $logins = explode(',', $userLogins); } |