public function context() {
// rule targets specific user, if this user is different we don't need to test the rule
if ( $this->user_id != 'all' ) {
if ( $this->user_id != get_current_user_id() ) {
return false;
}
}
if($this->user_id == "all")
{
if(get_current_user_id()===0)
{
return false;
}
}
return true;
}
File: gp-limit-submissions/includes/GPLS_Rule_User.php
Plugin: https://gravitywiz.com/documentation/gravity-forms-limit-submissions
Leave a Reply