Conditionnal error in file Model/Credit.php

  1. axome

    axome - May 5, 2014 New Member

    Credit
    Point
    Hi,

    I notice a small error in this file, please correct it for next update:
    PHP:
    if(!empty($includeGroups)){
                
    $inGroups = array();
                if(isset(
    $user['user_group_id']))$inGroups $user['user_group_id'];

                if (!empty(
    $user['secondary_group_ids']))
                {
                    
    $inGroups .= ','.$user['secondary_group_ids'];
                }

                
    $groupCheck explode(',',$inGroups);

                unset(
    $inGroups);

                foreach (
    $groupCheck AS $groupId)
                {
                    if (
    in_array($groupId$includeGroups))
                    {
                        
    $check true;
                        break;
                    }
                }
            }
            
    // THIS CONDITION IS NOT CORRECT
            
    if(!empty($includeForums) && $nodeId){
                if (
    in_array($nodeId$includeForums)){
                    
    $check true;
                }
            }
    Your $check value is already true if you defined groups restrictions so it's not a good test, you would better do this:

    PHP:
    if (!in_array($nodeId$includeForums)){
          
    $check false;
    }
    Kind regards,
    Bastien
     
    Loading...
  2. axome

    axome - May 5, 2014 New Member

    Credit
    Point
    Also, the Update full profile event never work for me, please, check about it!
     
    #2
  3. Brivium

    Brivium - May 7, 2014 XenForo Services Staff Member

    Credit
    Point
    #3