aboutsummaryrefslogtreecommitdiffstats
path: root/include/oauth.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-10-20 01:22:51 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-10-20 01:22:51 +0200
commit2db45695e8067e49eb4c8a6d8044cd9cac7f07e5 (patch)
tree7a1029e10578e99f0dbbef6e22c42eb784ddd9d1 /include/oauth.php
parentc0789bdb4fc7412efd5e2fb1e15b63d359a74cfa (diff)
parent49fb6326e0e978f57b2f988935af6e8e3d2f4417 (diff)
downloadvolse-hubzilla-2db45695e8067e49eb4c8a6d8044cd9cac7f07e5.tar.gz
volse-hubzilla-2db45695e8067e49eb4c8a6d8044cd9cac7f07e5.tar.bz2
volse-hubzilla-2db45695e8067e49eb4c8a6d8044cd9cac7f07e5.zip
Merge upstream
Diffstat (limited to 'include/oauth.php')
-rw-r--r--include/oauth.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/oauth.php b/include/oauth.php
index b10802ecd..8eb8a83d8 100644
--- a/include/oauth.php
+++ b/include/oauth.php
@@ -151,15 +151,22 @@ class FKOAuth1 extends OAuthServer {
header('HTTP/1.0 401 Unauthorized');
die('This api requires login');
}
+
$_SESSION['uid'] = $record['channel_id'];
$_SESSION['theme'] = $record['channel_theme'];
$_SESSION['account_id'] = $record['channel_account_id'];
$_SESSION['mobile_theme'] = get_pconfig($record['channel_id'], 'system', 'mobile_theme');
$_SESSION['authenticated'] = 1;
-// $_SESSION['page_flags'] = $record['page-flags'];
$_SESSION['my_url'] = $a->get_baseurl() . '/channel/' . $record['channel_address'];
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['allow_api'] = true;
+ $x = q("select * from account where account_id = %d limit 1",
+ intval($record['channel_account_id'])
+ );
+ if($x)
+ $a->account = $x[0];
+
+ change_channel($record['channel_id']);
$a->channel = $record;