Getting user data on POST call

@return mixed
174656
protected function getInputData()
    {
        (new HCGalleriesValidator())->validateForm();
        (new HCGalleriesTranslationsValidator())->validateForm();

        $_data = request()->all();

        array_set($data, 'record.publish_at', array_get($_data, 'publish_at'));
        array_set($data, 'record.expires_at', array_get($_data, 'expires_at'));

        array_set($data, 'translations', array_get($_data, 'translations'));
        array_set($data, 'images', array_get($_data, 'images', []));

        foreach ($data['translations'] as &$value)
            $value['slug'] = generateHCSlug(GalleriesTranslations::getTableName() . '_' . $value['language_code'], $value['title']);

        return makeEmptyNullable($data);
    }
332399
public function getData()
    {
        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'customerReference', 'cardReference', 'card');
        $this->getCard()->validate();

        $data = [
            'CustomerReference' => $this->getCustomerReference(),
            'ExpiryDate'        => $this->getCard()->getExpiryDate('my'),
            'MerchantNumber'    => $this->getMerchantId(),
            'Signature'         => $this->generateSignature(),
            'TokenPAN'          => $this->getCardReference()
        ];

        return $data;
    }
445459
protected function getInputData ()
    {
        (new HCAppsTokensValidator())->validateForm ();

        $_data = request ()->all ();

        $token = array_get ($_data, 'token');

        if (strlen($token) != 255)
            $token = random_str(255);

        array_set ($data, 'record.expires_at', array_get ($_data, 'expires_at'));
        array_set ($data, 'record.token', $token);
        array_set ($data, 'record.app_id', array_get ($_data, 'app_id'));

        return $data;
    }
62417
public static function getDatas() {
		$method = \strtolower ( $_SERVER ['REQUEST_METHOD'] );
		switch ($method) {
			case 'post' :
				if (self::getContentType () == 'application/x-www-form-urlencoded') {
					return $_POST;
				}
				break;
			case 'get' :
				return $_GET;
			default :
				return self::getInput ();
		}
		return self::getInput ();
	}
397388
public function getUserDetails()
    {
        $requestData = $this->getUserDetailsTargetData();

        $result = $this->rawRequest($requestData['url'], $requestData['params']);

        return $this->processUserDetails($result);
    }
1041910
public function user()
    {
        // If we've already retrieved the user for the current request we can just
        // return it back immediately. We do not want to fetch the user data on
        // every call to this method because that would be tremendously slow.
        if (! is_null($this->user)) {
            return $this->user;
        }

        $user = null;

        $token = $this->getTokenForRequest();

        if (! empty($token)) {
            $user = $this->provider->retrieveByCredentials(
                array($this->storageKey => $token)
            );
        }

        return $this->user = $user;
    }
1335726
protected function handlePOST()
    {
        if (empty($payload = $this->getPayloadData())) {
            throw new BadRequestException('No data supplied for operation.');
        }

        $data = [
            'username'          => array_get($payload, 'username'),
            'first_name'        => array_get($payload, 'first_name'),
            'last_name'         => array_get($payload, 'last_name'),
            'name'              => array_get($payload, 'name'),
            'email'             => array_get($payload, 'email'),
            'phone'             => array_get($payload, 'phone'),
            'security_question' => array_get($payload, 'security_question'),
            'security_answer'   => array_get($payload, 'security_answer'),
            'default_app_id'    => array_get($payload, 'default_app_id')
        ];

        $data = array_filter($data, function ($value) {
            return !is_null($value);
        });

        $user = Session::user();

        if (empty($user)) {
            throw new NotFoundException('No user session found.');
        }

        $oldToken = Session::getSessionToken();
        $email = $user->email;
        $user->update($data);

        if (!empty($oldToken) && $email !== array_get($data, 'email', $email)) {
            // Email change invalidates token. Need to create a new token.
            $forever = JWTUtilities::isForever($oldToken);
            Session::setUserInfoWithJWT($user, $forever);
            $newToken = Session::getSessionToken();

            return ['success' => true, 'session_token' => $newToken];
        }

        return ['success' => true];
    }
383464
private function _getResultData()
    {
        $def = $this->actionChain->getCurrentAction();
        $result = $def['result'];
        if (is_string($result)) {
            return $this->getAttribute($result);
        } elseif (is_array($result)) {
            return array_pop($result);
        } else {
            return null;
        }
    }
1185653
protected function _post()
    {
        $subject = $this->_subject([
            'entity' => $this->_entity($this->_request()->getData(), $this->saveOptions()),
            'saveMethod' => $this->saveMethod(),
            'saveOptions' => $this->saveOptions()
        ]);

        $event = $this->_trigger('beforeSave', $subject);
        if ($event->isStopped()) {
            return $this->_stopped($subject);
        }

        $saveCallback = [$this->_table(), $subject->saveMethod];
        if (call_user_func($saveCallback, $subject->entity, $subject->saveOptions)) {
            return $this->_success($subject);
        }

        $this->_error($subject);
    }
794694
public function adm_get_safe_user_data() {
		if (!$this->store_is_logged_in())
			return [AdminStoreError::USER_NOT_LOGGED_IN];
		$data = $this->user_data;
		foreach (['upass', 'usalt', 'sid', 'token', 'expire'] as $key)
			unset($data[$key]);
		return [0, $data];
	}
505292
public function getPinterestuser()
    {
        $endpoint = 'https://api.pinterest.com/v3/pidgets/users/' . $this->args['query'] . '/pins/';

        $curl = new \Modularity\Helper\Curl();
        $response = $curl->request('GET', $endpoint);

        return json_decode($response)->data->pins;
    }
22052
public function getData()
  {
    if($this->logout)
    {
      $buttons = new MessageButton( MessageButton::TYPE_ACCOUNT_UNLINK, '');
    }
    else
    {
      $buttons = new MessageButton( MessageButton::TYPE_ACCOUNT_LINK, '', $this->url);
    }
    
    $result = [
      'title' => $this->title,
      'subtitle' => $this->subtitle,
      'image_url' => $this->image_url,
      'buttons' => [$buttons->getData()]
    ];
    return $result;
  }
1095681
public function getRedirectData()
    {
        // Build the post data as expected by Datatrans.
        $params = $this->getData();
        $getData = array();
        foreach ($params as $key => $value) {
            $getData[$key] = $value;
        }

        return $getData;
    }
154486
public function getData()
    {
        $this->validateParams();

        $result = trim($this->getResult());

        if (substr($result, -2, 2) == '\"') {
            $result = stripslashes($result);
        }

        parse_str($result, $data);

        $sign     = trim($data['sign'], '"');
        $sign     = str_replace(' ', '+', $sign);
        $signType = trim($data['sign_type'], '"');

        $data['sign']      = $sign;
        $data['sign_type'] = $signType;

        return $data;
    }
1332534
public function getUserInRequest() {
    if (isset($_COOKIE[$this->cookieName])) {
      $user = $this->validateToken($_COOKIE[$this->cookieName],
          $this->clientId);
      if ($user) {
        $accountInfo = $this->getUserById($user->getUserId());
        $accountInfo->setProviderId($user->getProviderId());
        return $accountInfo;
      }
    }
    return null;
  }
126257
public function get_userinfo() {
        $url = $this->get_issuer()->get_endpoint_url('userinfo');
        $response = $this->get($url);
        if (!$response) {
            return false;
        }
        $userinfo = new stdClass();
        try {
            $userinfo = json_decode($response);
        } catch (\Exception $e) {
            return false;
        }

        $map = $this->get_userinfo_mapping();

        $user = new stdClass();
        foreach ($map as $openidproperty => $moodleproperty) {
            // We support nested objects via a-b-c syntax.
            $getfunc = function($obj, $prop) use (&$getfunc) {
                $proplist = explode('-', $prop, 2);
                if (empty($proplist[0]) || empty($obj->{$proplist[0]})) {
                    return false;
                }
                $obj = $obj->{$proplist[0]};

                if (count($proplist) > 1) {
                    return $getfunc($obj, $proplist[1]);
                }
                return $obj;
            };

            $resolved = $getfunc($userinfo, $openidproperty);
            if (!empty($resolved)) {
                $user->$moodleproperty = $resolved;
            }
        }

        if (empty($user->username) && !empty($user->email)) {
            $user->username = $user->email;
        }

        if (!empty($user->picture)) {
            $user->picture = download_file_content($user->picture, null, null, false, 10, 10, true, null, false);
        } else {
            $pictureurl = $this->issuer->get_endpoint_url('userpicture');
            if (!empty($pictureurl)) {
                $user->picture = $this->get($pictureurl);
            }
        }

        if (!empty($user->picture)) {
            // If it doesn't look like a picture lets unset it.
            if (function_exists('imagecreatefromstring')) {
                $img = @imagecreatefromstring($user->picture);
                if (empty($img)) {
                    unset($user->picture);
                } else {
                    imagedestroy($img);
                }
            }
        }

        return (array)$user;
    }
20862
public function getData(): Parameters
	{
		if($this->realMethod === 'GET')
		{
			return $this->getQuery();
		}
		elseif($this->realMethod === 'POST' && $this->hasFormData())
		{
			return $this->getPost();
		}

		return $this->getBody();
	}