original_string: public function isVariableRequired( $field )
      {
          switch ( $field )
          {
              case 'email':
                  $user = eZUser::currentUser();
                  if( !$user->isAnonymous() )
                  {
                      return false;
                  }
                  return true;
              case 'recaptcha':
                  // if the user bypasses captcha, don't validate field
                  $bypassCaptcha = ezcomPermission::hasAccessToSecurity( 'AntiSpam' , 'bypass_captcha' );
                  if( $bypassCaptcha['result'] )
                  {
                      return false;
                  }
                  return true;
              default:
              return parent::isVariableRequired( $field );
          }
      }
code: public function isVariableRequired( $field )
      {
          switch ( $field )
          {
              case 'email':
                  $user = eZUser::currentUser();
                  if( !$user->isAnonymous() )
                  {
                      return false;
                  }
                  return true;
              case 'recaptcha':
                  // if the user bypasses captcha, don't validate field
                  $bypassCaptcha = ezcomPermission::hasAccessToSecurity( 'AntiSpam' , 'bypass_captcha' );
                  if( $bypassCaptcha['result'] )
                  {
                      return false;
                  }
                  return true;
              default:
              return parent::isVariableRequired( $field );
          }
      }
code_tokens: public function isVariableRequired ( $ field ) { switch ( $ field ) { case 'email' : $ user = eZUser :: currentUser ( ) ; if ( ! $ user -> isAnonymous ( ) ) { return false ; } return true ; case 'recaptcha' : // if the user bypasses captcha, don't validate field $ bypassCaptcha = ezcomPermission :: hasAccessToSecurity ( 'AntiSpam' , 'bypass_captcha' ) ; if ( $ bypassCaptcha [ 'result' ] ) { return false ; } return true ; default : return parent :: isVariableRequired ( $ field ) ; } }
docstring: isVariableRequire in adding comment.
  When adding comment, for logined user the email is not required
  @see extension/ezcomments/classes/ezcomFormTool#isVariableRequired($field)
docstring_tokens: isVariableRequire in adding comment . When adding comment for logined user the email is not required