• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Problem with login and logoff with different grouped users

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
1 post • Page 1 of 1

Postby sfjuocekr » Mon Feb 11, 2008 7:04 pm

Code: Select all
<?php

$params = null;
define("IN_PHPBB", true);
$phpbb_root_path = "../forum/";
$phpEx = substr(strrchr(__FILE__, "."), 1);
include($phpbb_root_path . "common." . $phpEx);

$user->session_begin();
$auth->acl($user->data);
$user->setup("viewforum");

if ($user->data[username] == "Anonymous") header("Location: http://xxx.xxx.xxx/FORUMDIR/ucp.php?mode=login&redirect=CHATDIR");

require_once dirname(__FILE__)."/src/phpfreechat.class.php";

        $params["serverid"]                     = md5(__FILE__);
        $params["time_offset"]                  = 60*60*1;
        $params["title"]                        = "TITLE";
        $params["theme"]                        = "msn";
        $params["refresh_delay"]                = 500;
        $params["height"]                       = "320px";
        $params["channels"]                     = array("ROOM1");

        if ($user->data["group_id"] == 5) //admin
        {
                $params["isadmin"]              = true;
                $params["channels"]             = array("ROOM1", "ROOM2");
        }

        if ($user->data["group_id"] == 7) //custom group
        {
                $params["isadmin"]              = false;
                $params["channels"]             = array("ROOM2");
                $params["frozen_channels"]      = array("ROOM2");
        }

        if ($user->data["group_id"] == 2) //registered
        {
                $params["isadmin"]              = false;
                $params["channels"]             = array("ROOM1");
                $params["frozen_channels"]      = array("ROOM1");
        }

        $params["nick"]                         = $user->data[username];
        $params["frozen_nick"]                  = true;

        $chat = new phpFreeChat($params);

?>

Thats a first to start proper integration ...

But now the problem:

When I login on my customgrouped user then relog to a normal user, it trows up a popup that I cant join the second channel ... as ofcourse the channels are locked for a registered user.

Now what do I change to make this work? I dont want any of the registered users able to see ROOM2 and visaversa.

It works after closing the browser and restarting it, but how do I clear it properly at script execute?
sfjuocekr
New member
 
Posts: 2
Joined: Sun Feb 10, 2008 6:50 pm
Top

Post a reply
1 post • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 4 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub