aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/api.php4
-rw-r--r--include/oauth.php8
2 files changed, 2 insertions, 10 deletions
diff --git a/include/api.php b/include/api.php
index fa4910833..cf0086c35 100644
--- a/include/api.php
+++ b/include/api.php
@@ -439,8 +439,8 @@ require_once('include/items.php');
// This currently isn't providing the correct authentication flow.
- if(! api_user())
- return false;
+ if(! local_channel())
+ goaway(z_root() . '/login');
$ret = array();
$key = random_string(16);
diff --git a/include/oauth.php b/include/oauth.php
index a9509c68e..80336f906 100644
--- a/include/oauth.php
+++ b/include/oauth.php
@@ -175,16 +175,8 @@ class FKOAuth1 extends OAuthServer {
if(strlen($a->channel['channel_timezone'])) {
date_default_timezone_set($a->channel['channel_timezone']);
-// $a->timezone = $a->user['timezone'];
}
-// $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1",
-// intval($_SESSION['uid']));
-// if(count($r)) {
-// $a->contact = $r[0];
-// $a->cid = $r[0]['id'];
-// $_SESSION['cid'] = $a->cid;
-// }
// q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
// dbesc(datetime_convert()),
// intval($_SESSION['uid'])