diff options
Diffstat (limited to 'lib/public/json.php')
-rw-r--r-- | lib/public/json.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/public/json.php b/lib/public/json.php index 134f724b0e6..cd5d233ef90 100644 --- a/lib/public/json.php +++ b/lib/public/json.php @@ -167,6 +167,22 @@ class JSON { * @return string json formatted string if not admin user. */ public static function checkAdminUser() { - return(\OC_JSON::checkAdminUser()); + \OC_JSON::checkAdminUser(); + } + + /** + * Encode JSON + * @param array $data + */ + public static function encode($data) { + return(\OC_JSON::encode($data)); + } + + /** + * Check is a given user exists - send json error msg if not + * @param string $user + */ + public static function checkUserExists($user) { + \OC_JSON::checkUserExists($user); } } |