aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-28 18:50:35 -0700
committerfriendica <info@friendica.com>2012-10-28 18:50:35 -0700
commit4bcf19632bc5158095a5d2d5d63dea1b25b146b7 (patch)
tree362ccfbd661b779bd864fa6c7416c9a7b1c15069 /include/security.php
parent1a9ab127482ee4eb17e3d2bd0ffa222f7053715b (diff)
downloadvolse-hubzilla-4bcf19632bc5158095a5d2d5d63dea1b25b146b7.tar.gz
volse-hubzilla-4bcf19632bc5158095a5d2d5d63dea1b25b146b7.tar.bz2
volse-hubzilla-4bcf19632bc5158095a5d2d5d63dea1b25b146b7.zip
Now have a solid permissions model. Create a few functions to enumerate them and then we're off to the races.
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php
index 50c2337bf..dbeeb9177 100644
--- a/include/security.php
+++ b/include/security.php
@@ -210,7 +210,7 @@ function change_channel($change_channel) {
intval($change_channel),
intval(get_account_id())
);
- if($r && count($r)) {
+ if($r) {
$hash = $r[0]['channel_hash'];
$_SESSION['uid'] = intval($r[0]['channel_id']);
get_app()->set_channel($r[0]);
@@ -221,8 +221,10 @@ function change_channel($change_channel) {
$x = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($hash)
);
- if($x && count($x))
+ if($x) {
get_app()->set_observer($x[0]);
+ get_app()->set_perms(get_all_perms(local_user(),$hash));
+ }
}
return $ret;