Helper function to return dummy noreply user record.

@return stdClass
553575
protected static function get_dummy_user_record() {
        global $CFG;

        $dummyuser = new stdClass();
        $dummyuser->id = self::NOREPLY_USER;
        $dummyuser->email = $CFG->noreplyaddress;
        $dummyuser->firstname = get_string('noreplyname');
        $dummyuser->username = 'noreply';
        $dummyuser->lastname = '';
        $dummyuser->confirmed = 1;
        $dummyuser->suspended = 0;
        $dummyuser->deleted = 0;
        $dummyuser->picture = 0;
        $dummyuser->auth = 'manual';
        $dummyuser->firstnamephonetic = '';
        $dummyuser->lastnamephonetic = '';
        $dummyuser->middlename = '';
        $dummyuser->alternatename = '';
        $dummyuser->imagealt = '';
        return $dummyuser;
    }
1097238
public function getExportDocPositionClass_v2() {
		$class = new StdClass;

		$class->description = $this->getDescription();
		$class->countryCodeOrigin = $this->getCountryCodeOrigin();
		$class->customsTariffNumber = $this->getCustomsTariffNumber();
		$class->amount = $this->getAmount();
		$class->netWeightInKG = $this->getNetWeightInKG();
		$class->customsValue = $this->getCustomsValue();

		return $class;
	}
1072220
private function getActualUserFromDb()
    {
        $dao = $this->em->getRepository(CModel\User\User::class);
        return $dao->find($this->getUser()->id);
    }
581608
final public function to_record() {
        $data = new stdClass();
        $properties = static::properties_definition();
        foreach ($properties as $property => $definition) {
            $data->$property = $this->raw_get($property);
        }
        return $data;
    }
327202
function GetDetailedUsersArray()
  {
      $users_array = array();
      $result = $this->GetNextUserArray(TRUE);
      if (isset($result['user'])) {
          $users_array[$result['user']] = $result;
      }
      do {
          if ($result = $this->GetNextUserArray()) {
              if (isset($result['user'])) {
                  $users_array[$result['user']] = $result;
              }
          }
      } while (FALSE !== $result);
      return $users_array;
  }
817258
public function getIdentClass_v2() {
		$class = new StdClass;
		$class->surname = $this->getLastName();
		$class->givenName = $this->getFirstName();
		$class->dateOfBirth = $this->getBirthday();
		$class->minimumAge = $this->getMinimumAge();

		return $class;
	}
991280
public function findUser() {
        $model = ClassRegistry::init($this->usersModel);
        $id = trim($this->in('User ID:'));

        if (!$id) {
            $this->out('<error>Invalid ID, please try again</error>');
            return $this->findUser();
        }

        $result = $model->find('first', array(
            'conditions' => array($model->alias . '.' . $model->primaryKey => $id),
            'recursive' => -1
        ));

        if (!$result) {
            $this->out('<error>User does not exist, please try again</error>');
            return $this->findUser();
        }

        $this->user = $result;

        return $id;
    }
698292
function get_userinfo_asobj($username) {
        $user_array = truncate_userinfo($this->get_userinfo($username));
        $user = new stdClass();
        foreach($user_array as $key=>$value) {
            $user->{$key} = $value;
        }
        return $user;
    }
877446
private function get_forum_record() : stdClass {
        $forumdbdatamapper = $this->related['legacydatamapperfactory']->get_forum_data_mapper();
        return $forumdbdatamapper->to_legacy_object($this->forum);
    }
491631
public static function getCredential($user_id)
    {
        $sql = new Pluf_SQL('login=%s', array(
            $user_id
        ));
        return Pluf::factory('User_Account')->getOne($sql->gen());
    }
1078745
public function getRecord()
    {
        if (!$this->record && $this->form) {
            if ($this->form->getRecord() && is_a($this->form->getRecord(), 'DataObject')) {
                $this->record = $this->form->getRecord();
            } elseif ($this->form->Controller() && $this->form->Controller()->hasMethod('data')
                    && $this->form->Controller()->data() && is_a($this->form->Controller()->data(), 'DataObject')) {
                $this->record = $this->form->Controller()->data();
            }
        }
        return $this->record;
    }
1071770
private function getRecord()
    {
        $checks = [
            function () {
                if (!isset($this->params['identifier'])) {
                    throw new BadArgumentException("Missing required argument identifier");
                }
            },
            function () {
                if (!isset($this->params['metadataPrefix'])) {
                    throw new BadArgumentException("Missing required argument metadataPrefix");
                }
                $this->checkMetadataPrefix(
                    $this->params['metadataPrefix'],
                    isset($this->params['identifier']) ? $this->params['identifier'] : null
                );
            }
        ];
        $this->doChecks($checks);

        $record = $this->repository->getRecord($this->params['metadataPrefix'], $this->params['identifier']);
        $recordNode = $this->response->createElement('record');

        $header = $record->getHeader();
        $recordNode->appendChild($this->getRecordHeaderNode($header));

        // Only add metadata and about if the record is not deleted.
        if (!$header->isDeleted()) {
            $recordNode->appendChild($this->response->createElement('metadata'));

            // Push the record itself on the records stack
            array_push($this->records, $record->getMetadata());

            //only add an 'about' node if it's not null
            $about = $record->getAbout();
            if ($about !== null) {
                $recordNode->appendChild($this->response->createElement('about', $about));
            }
        }

        $getRecordNode = $this->response->createElement('GetRecord');
        $getRecordNode->appendChild($recordNode);

        return $getRecordNode;
    }
649719
public function getSimpleDiscount()
    {
        $oDiscount = new stdClass();
        $oDiscount->sOXID = $this->getId();
        $oDiscount->sDiscount = $this->oxdiscount__oxtitle->value;
        $oDiscount->sType = $this->oxdiscount__oxaddsumtype->value;

        return $oDiscount;
    }
1036471
public function get_db_record() {
        global $DB;
        if ($record = $DB->get_record('course_categories', array('id' => $this->id))) {
            return $record;
        } else {
            return (object)convert_to_array($this);
        }
    }
652927
protected function getRecord()
    {
        $id = (int) $this->request->param('ID');
        if (!$id) {
            $id = (int) $this->request->requestVar('ID');
        }
        if ($id) {
            $type = $this->stat('model_class');
            $action = $this->request->param('Action');
            if ($action == 'dashlet' || $action == 'widget') {
                $type = 'Dashlet';
            }
            $item = $this->dataService->byId($type, $id);
            if ($item instanceof DashboardPage) {
                $item->setController($this);
            }

            return $item;
        }
    }
1010641
public function getData() : \stdClass
    {
        $output = new \stdClass();

        $propertyNames = array_keys($this->defaultProperties);
        foreach ($propertyNames as $property) {
            $key = strtolower($property);

            if (array_key_exists($key, $this->data)) {
                $output->{$key} = $this->data[$key];
            } elseif ('parent' !== $key) {
                $output->{$key} = $this->defaultProperties[$property];
            }
        }

        // Don't want to normally do this, just if it exists in the data file
        // for our test runs
        if (array_key_exists('patternid', $this->data)) {
            $output->patternid = $this->data['patternid'];
        }

        return $output;
    }
210126
public function createUser($properties): UserRecord
    {
        $request = $properties instanceof Request\CreateUser
            ? $properties
            : Request\CreateUser::withProperties($properties);

        $response = $this->client->createUser($request);

        $uid = JSON::decode((string) $response->getBody(), true)['localId'];

        return $this->getUser($uid);
    }