diff options
author | friendica <info@friendica.com> | 2012-10-28 18:50:35 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-10-28 18:50:35 -0700 |
commit | 4bcf19632bc5158095a5d2d5d63dea1b25b146b7 (patch) | |
tree | 362ccfbd661b779bd864fa6c7416c9a7b1c15069 /include/security.php | |
parent | 1a9ab127482ee4eb17e3d2bd0ffa222f7053715b (diff) | |
download | volse-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.php | 6 |
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; |