1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Fixed Editing a User causes issues with 3rd party cash systems

Discussion in 'Sportsbook Resolved Bug Reports' started by anthony parsons, Mar 27, 2013.

  1. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    On user save from the ACP, sportsbook is actually causing credits to be wiped from the user profile.

    I did a little test by disabling trader and sports, then enabled trader, no issue. Enabled sportsbook... wiped credits on save.

    Disabled trader with just sportsbook running, wiped credits on user save via ACP.

    I suspect this has something to do with your change in how sportsbook integrated with mass payment and such functions you enabled. Maybe disable those functions and see if it still causes the issue... but it is sportsbook that is wiping credits on ACP user save.

    Test if for yourself with sportsbook enabled / disabled. Credits don't wipe from the user account at any other time, unless sportsbook is enabled.
     
  2. Bob

    Bob Developer Staff Member

    HOT FIX

    edit: /library/NFLJ/Sportsbook/Listener/LoadClassController.php

    Replace the entire contents with this.

    PHP:
    <?php
     
    /**
    * This file is for listening in on the Load Class Controller
    *
    * @author      Bob Baldani <bob@addons.nfljunkies.com>
    * @copyright  ©2013 addons.nfljunkies.com. All rights reserved.
    * @link        http://addons.nfljunkies.com
    * @package    NFLJ_Sportsbook
    */
    class NFLJ_Sportsbook_Listener_LoadClassController
    {
        
    /**
        * Instruct the system that XenForo_ControllerAdmin_User
        * should be extended by NFLJ_Sportsbook_ControllerAdmin_User
        *
        * @param string $class
        * @param array $extend
        */
        
    public static function extendAdminUserController($class, array &$extend)
        {
            
    $options XenForo_Application::get('options');
     
            if (
    $class == 'XenForo_ControllerAdmin_User')
            {
                
    // Only want to extend this if using internal sportsbook cash.
                
    if ($options->xisportsbookCashSystem['type'] == 'default')
                {               
                    
    $extend[] = 'NFLJ_Sportsbook_ControllerAdmin_User';
                }   
            }
        }
    }
     
    SneakyDave and anthony parsons like this.
  3. Bob

    Bob Developer Staff Member

    Same issue is in Stock Trader as well. I will post the file for it in the Stock Trader Bugs.
     
    anthony parsons likes this.
  4. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Nope... now it's wiping my credits even with sportsbook disabled, which it didn't do before the changes. This has removed the credits tab even showing on the user profile now.
     
  5. Bob

    Bob Developer Staff Member

    Swap with the edit above and try again. Both ways work fine for me.
     
  6. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Nope... just wiped it for me again.
     
  7. Bob

    Bob Developer Staff Member

    Then there is something else conflicting that is causing it. What the above does is disable Sportsbook from having anything to do with the XenForo_ControllerAdmin_User when set to use anything other than Sportsbook Cash.
     
    anthony parsons likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.