$global_nodeid = 1; if (isset($_COOKIE['nodeid'])) { $global_nodeid = $_COOKIE['nodeid']; } $nmDataService = new NodemanagerDataService($conf['dsn'], $conf['dbname'], $conf['dbpassword'], array(PDO::ATTR_PERSISTENT => false)); $um = new UserManager($nmDataService); $param = ""; $environment = $nmDataService->getEnvironment(); if ($forumname) { $logService->log('D4TRACE', 'LANDING forumname ', var_log($forumname, '$forumname'), ''); if ($task && $task == 'start_account') { $fid = $nmDataService->getForumIdByName($forumname); $nmDataService->configureForumApp($fid); // this will make sure that the app is private, not preview } $keys = $nmDataService->getDisqusApp($forumname); if ($keys) { $logService->log('D4TRACE', 'LANDING found app ', var_log($forumname, '$forumname'), ''); $environment['public_key'] = $keys['public_key']; $environment['secret_key'] = $keys['secret_key']; } else { //if invalid forumname, same as no forumname $logService->log('D4TRACE', 'LANDING not found app ', var_log($forumname, '$forumname'), ''); $keys = $nmDataService->getLoginApp(); $environment['public_key'] = $keys['public_key']; $environment['secret_key'] = $keys['secret_key']; } } else { if ($aid) { $keys = $nmDataService->getApp($aid); $logService->log('D4TRACE', 'LANDING specified app ', var_log($aid, '$forumname'), '');