protected function getBucketingId($userId, $userAttributes)
    {
        $bucketingIdKey = ControlAttributes::BUCKETING_ID;

        if (isset($userAttributes[$bucketingIdKey])) {
            if (is_string($userAttributes[$bucketingIdKey])) {
                return $userAttributes[$bucketingIdKey];
            }
            $this->_logger->log(Logger::WARNING, 'Bucketing ID attribute is not a string. Defaulted to user ID.');
        }
        return $userId;
    }
protected function getBucketingId($userId, $userAttributes)
    {
        $bucketingIdKey = ControlAttributes::BUCKETING_ID;

        if (isset($userAttributes[$bucketingIdKey])) {
            if (is_string($userAttributes[$bucketingIdKey])) {
                return $userAttributes[$bucketingIdKey];
            }
            $this->_logger->log(Logger::WARNING, 'Bucketing ID attribute is not a string. Defaulted to user ID.');
        }
        return $userId;
    }
protected function getBucketingId ( $ userId , $ userAttributes ) { $ bucketingIdKey = ControlAttributes :: BUCKETING_ID ; if ( isset ( $ userAttributes [ $ bucketingIdKey ] ) ) { if ( is_string ( $ userAttributes [ $ bucketingIdKey ] ) ) { return $ userAttributes [ $ bucketingIdKey ] ; } $ this -> _logger -> log ( Logger :: WARNING , 'Bucketing ID attribute is not a string. Defaulted to user ID.' ) ; } return $ userId ; }
Gets the ID for Bucketing

@param string $userId         user ID
@param array  $userAttributes user attributes

@return String representing bucketing ID if it is a String type in attributes else return user ID.
Gets the ID for Bucketing