xeagle |
03-02-2013 05:02 PM |
Quote:
Originally Posted by teamsupra
(Post 2406959)
Help I have 2 issues.
1. Sometimes when a user signed up they get the Administrator group added as an additional usergroup to their account
2. Glowhost is showing errors when enabled. This is sorta bad since this is one of the most important and most used plugin for the VB community.
Here is the glow host error:
Code:
Hook name Hook code
inlinemod_action_switch require_once('includes/functions_ghsom.php'); SOM_cleanupProcess();
postdata_presave if(defined('VBSEO_ENABLED')) vbseo_complete_sec('postdata_presave'); $skip_post = false; if (!empty($this->info['is_automated'])) if ($this->info['is_automated'] == 'rss') { $skip_post = true; } if (!$skip_post) { //Let's create new group for newbies members $is_noob_user = false; $noob_group_id = $this->registry->options['glowhostspamomatic_noob_group_id']; $checkuser = $this->dbobject->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=".$this->registry->userinfo['userid']); if (is_member_of($checkuser, $noob_group_id)) $is_noob_user = true; require_once('includes/functions_ghsom.php'); $is_protected_user = false; foreach (array('glowhostspamomatic_bsc_protect_group', 'glowhostspamomatic_bsc_protect_user') as $option) { $this->registry->options[$option] = clean_options_list($this->registry->options[$option]); } if ((is_member_of($checkuser, explode(",", $this->registry->options['glowhostspamomatic_bsc_protect_group']))) || (in_array($this->registry->userinfo['userid'], explode(",", $this->registry->options['glowhostspamomatic_bsc_protect_user'])))) { $is_protected_user = true; } if ($this->registry->userinfo['userid'] == 0) { $is_protected_user = false; } if ($this->registry->options['glowhostspamomatic_automodenabled'] == 1) { //automod enabled $automod_apply = false; if ($this->registry->options['glowhostspamomatic_noob_enabled'] == 1) { if ($this->registry->options['glowhostspamomatic_noob_restrict_automod'] == 1) { // noob enabled and automod restricted.... check the group if ($is_noob_user) $automod_apply = true; // he-he, let's apply auto-mod } else if (!$is_protected_user) $automod_apply = true; // no restriction.... only automod settings matter } else if (!$is_protected_user) $automod_apply = true; // noob disabled.... only automod settings matter if ($automod_apply) { if (($this->registry->userinfo['posts'] < $this->registry->options['glowhostspamomatic_automodpostcount']) || ($this->registry->options['glowhostspamomatic_automodpostcount'] == 0)) { // check for postcount is lower than specified in settings $keywords = explode("\n", $this->registry->options['glowhostspamomatic_automodkeywords']); $keywords = array_map('trim', $keywords); if (str_replace($keywords, '', strtolower($this->fetch_field('pagetext', 'post'))) != strtolower($this->fetch_field('pagetext', 'post')) AND !can_moderate()) { if ($this->registry->options['glowhostspamomatic_automodpostaction'] == 1) standard_error(fetch_error('glowhostspamomatic_reject_post', $query)); else { $this->set('visible', 0); $sql = 'INSERT INTO '.TABLE_PREFIX.'glowhostspamomatic_log(`date`, `ip`, `email`, `username`, `message`, `is_blocked`, `user_hash`) VALUES (now(), "'.addslashes($_SERVER['REMOTE_ADDR']).'", "'.addslashes($this->registry->userinfo['email']).'", "'.addslashes($this->registry->userinfo['username']).'", "registry->config['Misc']['modcpdir'].'/moderate.php?do=posts\">Post put under moderation based on Auto-Moderation Keywords", "0", ""); '; $this->dbobject->query($sql); $sql = 'UPDATE '.TABLE_PREFIX.'glowhostspamomatic_stats SET moderated = moderated + 1; '; $this->dbobject->query($sql); } } else { $link_count = substr_count(strtolower($this->fetch_field('pagetext', 'post')), 'http:'); $link_count += substr_count($this->fetch_field('pagetext', 'post'), '@'); if (($link_count > $this->registry->options['glowhostspamomatic_automodurls']) && !can_moderate()) { if ($this->registry->options['glowhostspamomatic_automodpostaction'] == 1) standard_error(fetch_error('glowhostspamomatic_reject_post', $query)); else { $this->set('visible', 0); $sql = 'INSERT INTO '.TABLE_PREFIX.'glowhostspamomatic_log(`date`, `ip`, `email`, `username`, `message`, `is_blocked`, `user_hash`) VALUES (now(), "'.addslashes($_SERVER['REMOTE_ADDR']).'", "'.addslashes($this->registry->userinfo['email']).'", "'.addslashes($this->registry->userinfo['username']).'", "registry->config['Misc']['modcpdir'].'/moderate.php?do=posts\">Post put under moderation based on Auto-Moderation URL count", "0", ""); '; $this->dbobject->query($sql); $sql = 'UPDATE '.TABLE_PREFIX.'glowhostspamomatic_stats SET moderated = moderated + 1; '; $this->dbobject->query($sql); } } } } } } if ($this->registry->options['glowhostspamomatic_noob_enabled'] == 1) { if ($this->registry->options['glowhostspamomatic_noob_autopromote'] == 1) { if ($is_noob_user) { // he-he, let's apply auto-mod if ($this->registry->userinfo['posts'] >= $this->registry->options['glowhostspamomatic_noob_promotepostcount']) { $sql = 'UPDATE `'.TABLE_PREFIX.'user` SET `usergroupid` = '.$this->registry->options['glowhostspamomatic_noob_reg_ugroup'].' WHERE `userid` = '.$this->registry->userinfo['userid'].'; '; $this->dbobject->query($sql); } } } } }
newpost_process if(defined('VBSEO_ENABLED')) vbseo_complete_sec('newpost_process'); if ($vbulletin->options['glowhostspamomatic_akismet_enabled'] == 1) { require_once('includes/functions_ghsom.php'); foreach (array('glowhostspamomatic_bsc_protect_group', 'glowhostspamomatic_bsc_protect_user') as $option) { $vbulletin->options[$option] = clean_options_list($vbulletin->options[$option]); } $checkuser = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=".$vbulletin->userinfo['userid']); if ((!is_member_of($checkuser, explode(",", $vbulletin->options['glowhostspamomatic_bsc_protect_group']))) && (!in_array($vbulletin->userinfo['userid'], explode(",", $vbulletin->options['glowhostspamomatic_bsc_protect_user'])))) { if (($vbulletin->userinfo['posts'] < $vbulletin->options['glowhostspamomatic_akismet_postcount']) || ($vbulletin->options['glowhostspamomatic_akismet_postcount'] == 0)) { // check for postcount is lower than specified in settings $key = $vbulletin->options['glowhostspamomatic_akismet_key']; $vbghsfs_host = $key.'.rest.akismet.com'; $comment['user_ip'] = $_SERVER['REMOTE_ADDR']; $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT']; $comment['referrer'] = $_SERVER['HTTP_REFERER']; $comment['blog'] = $vbulletin->options['bburl']; $comment['comment_author'] = $vbulletin->userinfo['username']; $comment['comment_content'] = $post['message']; if (SOM_AkismetCheckComment($comment, $vbghsfs_host)) { $dataman->set('visible', 0); $post['visible'] = 0; $sql = 'INSERT INTO '.TABLE_PREFIX.'glowhostspamomatic_log(`date`, `ip`, `email`, `username`, `message`, `is_blocked`, `user_hash`) VALUES (now(), "'.addslashes($_SERVER['REMOTE_ADDR']).'", "'.addslashes($vbulletin->userinfo['email']).'", "'.addslashes($vbulletin->userinfo['username']).'", "config[Misc][modcpdir].'/moderate.php?do=posts\">Post put under moderation based on Akismet result", "0", ""); '; $vbulletin->db->query($sql); $sql = 'UPDATE '.TABLE_PREFIX.'glowhostspamomatic_stats SET moderated = moderated + 1; '; $vbulletin->db->query($sql); } } } }
threadfpdata_presave $skip_post = false; if (!empty($this->info['is_automated'])) if ($this->info['is_automated'] == 'rss') { $skip_post = true; } if (!$skip_post) { //Let's create new group for newbies members $is_noob_user = false; $noob_group_id = $this->registry->options['glowhostspamomatic_noob_group_id']; $checkuser = $this->dbobject->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=".$this->registry->userinfo['userid']); if (is_member_of($checkuser, $noob_group_id)) $is_noob_user = true; require_once('includes/functions_ghsom.php'); $is_protected_user = false; foreach (array('glowhostspamomatic_bsc_protect_group', 'glowhostspamomatic_bsc_protect_user') as $option) { $this->registry->options[$option] = clean_options_list($this->registry->options[$option]); } if ((is_member_of($checkuser, explode(",", $this->registry->options['glowhostspamomatic_bsc_protect_group']))) || (in_array($this->registry->userinfo['userid'], explode(",", $this->registry->options['glowhostspamomatic_bsc_protect_user'])))) { $is_protected_user = true; } if ($this->registry->userinfo['userid'] == 0) { $is_protected_user = false; } if ($this->registry->options['glowhostspamomatic_automodenabled'] == 1) { //automod enabled $automod_apply = false; if ($this->registry->options['glowhostspamomatic_noob_enabled'] == 1) { if ($this->registry->options['glowhostspamomatic_noob_restrict_automod'] == 1) { // noob enabled and automod restricted.... check the group if ($is_noob_user) $automod_apply = true; // he-he, let's apply auto-mod } else if (!$is_protected_user) $automod_apply = true; // no restriction.... only automod settings matter } else if (!$is_protected_user) $automod_apply = true; // noob disabled.... only automod settings matter if ($automod_apply) { if (($this->registry->userinfo['posts'] < $this->registry->options['glowhostspamomatic_automodpostcount']) || ($this->registry->options['glowhostspamomatic_automodpostcount'] == 0)) { // check for postcount is lower than specified in settings $keywords = explode("\n", $this->registry->options['glowhostspamomatic_automodkeywords']); $keywords = array_map('trim', $keywords); if (str_replace($keywords, '', strtolower($this->fetch_field('pagetext', 'post'))) != strtolower($this->fetch_field('pagetext', 'post')) && !can_moderate()) { if ($this->registry->options['glowhostspamomatic_automodpostaction'] == 1) standard_error(fetch_error('glowhostspamomatic_reject_post', $query)); else { $this->set('visible', 0); $sql = 'INSERT INTO '.TABLE_PREFIX.'glowhostspamomatic_log(`date`, `ip`, `email`, `username`, `message`, `is_blocked`, `user_hash`) VALUES (now(), "'.addslashes($_SERVER['REMOTE_ADDR']).'", "'.addslashes($this->registry->userinfo['email']).'", "'.addslashes($this->registry->userinfo['username']).'", "registry->config['Misc']['modcpdir'].'/moderate.php?do=posts\">Post put under moderation based on Auto-Moderation Keywords", "0", ""); '; $this->dbobject->query($sql); $sql = 'UPDATE '.TABLE_PREFIX.'glowhostspamomatic_stats SET moderated = moderated + 1; '; $this->dbobject->query($sql); } } else { $link_count = substr_count(strtolower($this->fetch_field('pagetext', 'post')), 'http:'); $link_count += substr_count($this->fetch_field('pagetext', 'post'), '@'); if (($link_count > $this->registry->options['glowhostspamomatic_automodurls']) && !can_moderate()) { if ($this->registry->options['glowhostspamomatic_automodpostaction'] == 1) standard_error(fetch_error('glowhostspamomatic_reject_post', $query)); else { $this->set('visible', 0); $sql = 'INSERT INTO '.TABLE_PREFIX.'glowhostspamomatic_log(`date`, `ip`, `email`, `username`, `message`, `is_blocked`, `user_hash`) VALUES (now(), "'.addslashes($_SERVER['REMOTE_ADDR']).'", "'.addslashes($this->registry->userinfo['email']).'", "'.addslashes($this->registry->userinfo['username']).'", "registry->config['Misc']['modcpdir'].'/moderate.php?do=posts\">Post put under moderation based on Auto-Moderation URL count", "0", ""); '; $this->dbobject->query($sql); $sql = 'UPDATE '.TABLE_PREFIX.'glowhostspamomatic_stats SET moderated = moderated + 1; '; $this->dbobject->query($sql); } } } } } } if ($this->registry->options['glowhostspamomatic_noob_enabled'] == 1) { if ($this->registry->options['glowhostspamomatic_noob_autopromote'] == 1) { if ($is_noob_user) { // he-he, let's apply auto-mod if ($this->registry->userinfo['posts'] >= $this->registry->options['glowhostspamomatic_noob_promotepostcount']) { $sql = 'UPDATE `'.TABLE_PREFIX.'user` SET `usergroupid` = '.$this->registry->options['glowhostspamomatic_noob_reg_ugroup'].' WHERE `userid` = '.$this->registry->userinfo['userid'].'; '; $this->dbobject->query($sql); } } } } }
register_addmember_complete require_once(DIR . '/vbsso/vbsso.php'); vbsso_register_addmember_complete_hook($userid); require_once('includes/functions_ghsom.php'); SOM_UpdateLog();
register_addmember_process $vbghsfs_Purged = false; $vbghsfs_userHash = ''; if (empty($userdata->errors)) { require_once('includes/functions_ghsom.php'); SOM_Process(); if ($vbulletin->options['glowhostspamomatic_noob_enabled'] == 1) { //move users.... if ($vbulletin->options['verifyemail'] == 0) { //move only if verification disabled $noob_group_id = $vbulletin->options['glowhostspamomatic_noob_group_id']; if ($noob_group_id != '') $userdata->set('usergroupid', $noob_group_id); } } }
|
1) It shouldn't happen. If it's reproducible if you disable all your other products, please contact vBSSO support, and provide them accurate scenario how to reproduce this and they will help you to resolve this.
2) There should be instructions while vBSSO pops the error how to fix Glowhost plugins and make this working.
|