Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class GroupStrings_ControllerPublic_GroupStrings extends XFCP_GroupStrings_ControllerPublic_GroupStrings
- {
- $db = XenForo_Application::get('db');
- $groups = $db->fetchAll("SELECT * FROM `xf_user_group` WHERE `strings`!=''");
- $match = 0;
- foreach ($groups as $group)
- {
- $strings = str_replace(" ", "", $group['strings']);
- if (stristr(',', $strings))
- {
- $strings = explode(",", $strings);
- foreach ($strings as $string)
- {
- if (strlen($data['email']) == (strlen($string) && strripos($data['email'], $string)))
- {
- $match = $group['user_group_id'];
- }
- }
- }
- if (stristr($data['email'], $strings))
- {
- $match = $group['user_group_id'];
- }
- }
- if ($match == 0)
- {
- $writer->set('user_group_id', XenForo_Model_User::$defaultRegisteredGroupId);
- }
- else
- {
- $writer->set('user_group_id', $match);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement