original_string: public static function is_real_user($userid, $checkdb = false) {
          global $DB;
  
          if ($userid <= 0) {
              return false;
          }
          if ($checkdb) {
              return $DB->record_exists('user', array('id' => $userid));
          } else {
              return true;
          }
      }
code: public static function is_real_user($userid, $checkdb = false) {
          global $DB;
  
          if ($userid <= 0) {
              return false;
          }
          if ($checkdb) {
              return $DB->record_exists('user', array('id' => $userid));
          } else {
              return true;
          }
      }
code_tokens: public static function is_real_user ( $ userid , $ checkdb = false ) { global $ DB ; if ( $ userid <= 0 ) { return false ; } if ( $ checkdb ) { return $ DB -> record_exists ( 'user' , array ( 'id' => $ userid ) ) ; } else { return true ; } }
docstring: Return true if user id is greater than 0 and alternatively check db.
  
  @param int $userid user id.
  @param bool $checkdb if true userid will be checked in db. By default it's false, and
  userid is compared with 0 for performance.
  @return bool true is real user else false.
docstring_tokens: Return true if user id is greater than 0 and alternatively check db .