• Resolved Lavenderworld

    (@lavenderworld)


    Hi There,
    I’m trying to figure out if it is possible to limit anonymous answer attempts form the same IP somehow?

    While testing , I noticed if I refreshed the page – I was able to poll again – consider I am a guest and not logged in..

    I’m running YOP-Poll version 4.9.2 on WordPress 3.9.2…
    Any workarounds?

    https://www.ads-software.com/plugins/yop-poll/

Viewing 1 replies (of 1 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hi Lavenderworld,

    Edit yop_poll_model.php and in register_vote function, after

    $facebook_user_details = json_decode( self::base64_decode( $request['facebook_user_details'] ), true );

    add

    global $wpdb;
                    $ip     = self::get_ip();
                    $log_id = $wpdb->get_var( $wpdb->prepare( "
         SELECT id
         FROM " . $wpdb->yop_poll_logs . "
         WHERE poll_id = %d AND
         ip = %s
    
         ", $this->poll['id'], $ip) );
                    if(isset($log_id)&& $log_id>the number of votes you set) {
    
                        $this->error = __( 'You have run out of votes', 'yop_poll' );
                        return false;
                    }

    Let us know if you need more help.

    Regards,

    YOP Team

Viewing 1 replies (of 1 total)
  • The topic ‘YOP Poll – Need to limit anonymous user poll answers from same IP’ is closed to new replies.