diff options
| author | Heiko Adams <h.adams@heiko-adams.de> | 2016-08-19 17:25:05 +0200 |
|---|---|---|
| committer | Heiko Adams <h.adams@heiko-adams.de> | 2016-08-19 17:25:05 +0200 |
| commit | 2842cf6e4563d1665741dd4c151798e6e282c60b (patch) | |
| tree | 6aa8c94dd1d3ae81976dd154ee6ca46eb31908f1 /api/index.php | |
| parent | 94e3a9ab44d82e0d7052d5e2e40496230b5f21a4 (diff) | |
| parent | c565a0cc21a6ee3e74ac9bc0cf4bfdde7cc84efd (diff) | |
Merge branch 'master' into german-translation
Diffstat (limited to 'api/index.php')
| -rw-r--r-- | api/index.php | 14 |
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); |