summaryrefslogtreecommitdiff
path: root/api/index.php
diff options
context:
space:
mode:
authorHeiko Adams <[email protected]>2016-08-19 17:25:05 +0200
committerHeiko Adams <[email protected]>2016-08-19 17:25:05 +0200
commit2842cf6e4563d1665741dd4c151798e6e282c60b (patch)
tree6aa8c94dd1d3ae81976dd154ee6ca46eb31908f1 /api/index.php
parent94e3a9ab44d82e0d7052d5e2e40496230b5f21a4 (diff)
parentc565a0cc21a6ee3e74ac9bc0cf4bfdde7cc84efd (diff)
Merge branch 'master' into german-translation
Diffstat (limited to 'api/index.php')
-rw-r--r--api/index.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/api/index.php b/api/index.php
index a8484ef0e..d451a3ac8 100644
--- a/api/index.php
+++ b/api/index.php
@@ -57,6 +57,20 @@
if (!init_plugins()) return;
+ if ($_SESSION["uid"]) {
+ if (!validate_session()) {
+ header("Content-Type: text/json");
+
+ print json_encode(array("seq" => -1,
+ "status" => 1,
+ "content" => array("error" => "NOT_LOGGED_IN")));
+
+ return;
+ }
+
+ load_user_plugins( $_SESSION["uid"]);
+ }
+
$method = strtolower($_REQUEST["op"]);
$handler = new API($_REQUEST);