aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-01 19:04:21 -0700
committerfriendica <info@friendica.com>2012-10-01 19:04:21 -0700
commitdc8a46477b245dc89c3de69ddc61e83a2b8bd22a (patch)
tree5b44415ab9c6c7ac036c719e5a1c10d8e0f6d7ea /include/security.php
parent846a9813b23911ae2a87d87fb6fd9f188ed84dc0 (diff)
downloadvolse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.tar.gz
volse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.tar.bz2
volse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.zip
use hash for channel id
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/security.php b/include/security.php
index e221ad59b..a85787588 100644
--- a/include/security.php
+++ b/include/security.php
@@ -220,6 +220,27 @@ function can_write_wall(&$a,$owner) {
}
+function change_channel($change_channel) {
+
+ $r = false;
+
+ if($change_channel) {
+ $r = q("select * from channel where channel_id = %d and channel_account_id = %d limit 1",
+ intval($change_channel),
+ intval(get_account_id())
+ );
+ if($r && count($r)) {
+ $_SESSION['uid'] = intval($r[0]['channel_id']);
+ get_app()->set_channel($r[0]);
+ $_SESSION['theme'] = $r[0]['channel_theme'];
+ date_default_timezone_set($r[0]['channel_timezone']);
+ }
+ }
+
+ return $r;
+
+}
+
function permissions_sql($owner_id,$remote_verified = false,$groups = null) {
$local_user = local_user();