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 );
        }
    }
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 );
        }
    }
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 ) ; } }
isVariableRequire in adding comment.
When adding comment, for logined user the email is not required
@see extension/ezcomments/classes/ezcomFormTool#isVariableRequired($field)
isVariableRequire in adding comment . When adding comment for logined user the email is not required