public static function anonymizeUserId($userId)
    {
        $trackerCache = Tracker\Cache::getCacheGeneral();
        $salt = '';
        if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) {
            $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT];
        }
        if(empty($salt)) {
            return $userId;
        }
        return sha1($userId . $salt);
    }
public static function anonymizeUserId($userId)
    {
        $trackerCache = Tracker\Cache::getCacheGeneral();
        $salt = '';
        if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) {
            $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT];
        }
        if(empty($salt)) {
            return $userId;
        }
        return sha1($userId . $salt);
    }
public static function anonymizeUserId ( $ userId ) { $ trackerCache = Tracker \ Cache :: getCacheGeneral ( ) ; $ salt = '' ; if ( ! empty ( $ trackerCache [ PrivacyManager :: OPTION_USERID_SALT ] ) ) { $ salt = $ trackerCache [ PrivacyManager :: OPTION_USERID_SALT ] ; } if ( empty ( $ salt ) ) { return $ userId ; } return sha1 ( $ userId . $ salt ) ; }
pseudo anonymization as we need to make sure to always generate the same UserId for the same original UserID

@param $userId
@return string
pseudo anonymization as we need to make sure to always generate the same UserId for the same original UserID