original_string: public function get_user($userid) {
          global $DB;
  
          if (empty(self::$cachedusers[$userid])) {
              $fields = get_all_user_name_fields(true);
              self::$cachedusers[$userid] = $DB->get_record('user', array('id' => $userid), 'id, ' . $fields);
          }
          return self::$cachedusers[$userid];
      }
code: public function get_user($userid) {
          global $DB;
  
          if (empty(self::$cachedusers[$userid])) {
              $fields = get_all_user_name_fields(true);
              self::$cachedusers[$userid] = $DB->get_record('user', array('id' => $userid), 'id, ' . $fields);
          }
          return self::$cachedusers[$userid];
      }
code_tokens: public function get_user ( $ userid ) { global $ DB ; if ( empty ( self :: $ cachedusers [ $ userid ] ) ) { $ fields = get_all_user_name_fields ( true ) ; self :: $ cachedusers [ $ userid ] = $ DB -> get_record ( 'user' , array ( 'id' => $ userid ) , 'id, ' . $ fields ) ; } return self :: $ cachedusers [ $ userid ] ; }
docstring: Returns user data checking the internal static cache.
  
  Including here the minimum required user information as this may grow big.
  
  @param int $userid
  @return stdClass
docstring_tokens: Returns user data checking the internal static cache .