aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-25 17:57:20 -0700
committerfriendica <info@friendica.com>2012-09-25 17:57:20 -0700
commitfbafd92f7f7b96b215b98f30de9a1ccbdb3479be (patch)
treef1f6739d513ac297fbd14162b8377cc4cf84c784 /include/security.php
parentdd5725c2725b742473ce285dce8573da37fb8053 (diff)
downloadvolse-hubzilla-fbafd92f7f7b96b215b98f30de9a1ccbdb3479be.tar.gz
volse-hubzilla-fbafd92f7f7b96b215b98f30de9a1ccbdb3479be.tar.bz2
volse-hubzilla-fbafd92f7f7b96b215b98f30de9a1ccbdb3479be.zip
moving a lot of structure around. 'entity' is now 'channel'
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/security.php b/include/security.php
index bc1e97059..f5e829e47 100644
--- a/include/security.php
+++ b/include/security.php
@@ -27,27 +27,27 @@ function authenticate_success($user_record, $login_initial = false, $interactive
$uid_to_load = (((x($_SESSION,'uid')) && (intval($_SESSION['uid']))) ? intval($_SESSION['uid']) : 0);
if(! $uid_to_load)
- $uid_to_load = intval($a->account['account_default_entity']);
+ $uid_to_load = intval($a->account['account_default_channel']);
if($uid_to_load) {
- $r = q("select * from entity where entity_id = %d and entity_account_id = %d limit 1",
+ $r = q("select * from channel where channel_id = %d and channel_account_id = %d limit 1",
intval($uid_to_load),
intval($a->account['account_id'])
);
if($r && count($r)) {
- $_SESSION['uid'] = intval($r[0]['entity_id']);
- $a->identity = $r[0];
- $_SESSION['theme'] = $a->identity['entity_theme'];
- date_default_timezone_set($a->identity['entity_timezone']);
+ $_SESSION['uid'] = intval($r[0]['channel_id']);
+ $a->set_channel($r[0]);
+ $_SESSION['theme'] = $r[0]['channel_theme'];
+ date_default_timezone_set($r[0]['channel_timezone']);
}
- $r = q("SELECT * FROM contact WHERE uid = %d AND self = 1 LIMIT 1",
- intval($a->identity['entity_id'])
+ $c = q("SELECT * FROM contact WHERE uid = %d AND self = 1 LIMIT 1",
+ intval($r[0]['channel_id'])
);
- if($r && count($r)) {
- $a->contact = $r[0];
- $a->cid = $r[0]['id'];
+ if($c && count($c)) {
+ $a->contact = $c[0];
+ $a->cid = $c[0]['id'];
$_SESSION['cid'] = $a->cid;
}