@param array $userData

@return UserInterface
182329
public function getUser(array $userData): UserInterface
    {
        if (gettype($userData[ self::FIELD_ID ]) === 'string') {
            $userData[ self::FIELD_ID ] = Uuid::fromString($userData[ self::FIELD_ID ]);
        }

        if (gettype($userData[ self::FIELD_EMAIL ]) === 'string') {
            $userData[ self::FIELD_EMAIL ] = new Email($userData[ self::FIELD_EMAIL ]);
        }

        if (isset($userData[ self::FIELD_LAST_LOGIN ]) === false) {
            $userData[ self::FIELD_LAST_LOGIN ] = 'now';
        }

        return new User(
            $userData[ self::FIELD_ID ],
            $userData[ self::FIELD_EMAIL ],
            $userData[ self::FIELD_NAME ],
            new DateTime($userData[ self::FIELD_BIRTHDAY ]),
            new DateTime($userData[ self::FIELD_LAST_LOGIN ])
        );
    }
101043
private function setupUserData($userData = array())
	{
		$returnable = array();

		foreach($userData as $key => $value)
		{
			switch($key)
			{
				case 'URL':
					// Remove shop domain
					$url = str_replace($this->_API['SHOP_DOMAIN'], '', $value);

					// Verify it contains /admin/
					if (strpos($url, '/admin/') !== 0)
					{
						$url = str_replace('//', '/', '/admin/' . preg_replace('/\/?admin\/?/', '', $url));
					}
					$returnable[$key] = $url;
					break;

				default:
					$returnable[$key] = $value;

			}
		}

		return $returnable;
	}
324407
public function getUser($userId)
    {
        $response = $this->client->get(sprintf('/v2/user/%s', $userId));

        return new User($response);
    }
750941
public function appendArray(array $arrayData)
    {
        foreach ($arrayData as $dataKey => $data) {
            $this->_putData($dataKey, $data);
        }

        if ($this->_objectCreation) {
            return $this->_afterAppendDataToNewObject();
        }
        return $this;
    }
1336142
public boolean addUserData(Object userData) {
		if (this.userData == null) {
			this.userData = new ArrayList<>();
		}
		return this.userData.add(userData);
	}
990654
protected function getCallBackUser($data)
    {
        // simulating user object
        $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        $user->initializeUserForCallBackPayPalUser($data);

        return $user;
    }
1082199
public function getUser(string $userid)
    {
        $cl = $this->getUserClass();
        $user = new $cl;
        return $user->obtainByUserID($userid);
    }
853908
public function execute($respTrackData = null, $userId = null)
    {
        $batch     = $this->getBatch();
        $tracker   = $this->loader->getTracker();
        $respTrack = $tracker->getRespondentTrack($respTrackData);
        $engine    = $respTrack->getTrackEngine();

        $engine->checkRoundsFor($respTrack, $userId, $batch);
    }
372517
protected function createNodeForVariant(NodeData $nodeData): NodeInterface
    {
        $contextProperties = $this->context->getProperties();
        $contextProperties['dimensions'] = $nodeData->getDimensionValues();
        unset($contextProperties['targetDimensions']);
        $adjustedContext = $this->contextFactory->create($contextProperties);

        return $this->nodeFactory->createFromNodeData($nodeData, $adjustedContext);
    }
528926
public function setUserAgent($userAgent) {
		$this->userAgent = $userAgent;
		$this->removeHeader(self::HEADER_KEY_USER_AGENT);
		$this->addHeader(self::HEADER_KEY_USER_AGENT, $userAgent);
		return $this;
	}
488332
private function getSchemaVariationName($userData, $variations)
    {
        foreach ($variations as $variationName => $expressions) {
            $results = array_map(
                function ($expression) use ($userData) {
                    return $this->jmesRuntime->__invoke($expression, $userData);
                },
                $expressions
            );

            $results = array_unique($results);

            if (count($results) == 1 && $results[0] === true) {
                return $variationName;
            }
        }

        return null;
    }
634587
public function create(array $entityData)
    {
        $this->preCreate($entityData);
        $entity = $this->doCreate($entityData);
        $this->getEntityManager()->persist($entity);
        $this->getEntityManager()->flush($entity);
        $this->postCreate($entity);
        $this->getEntityManager()->flush($entity);

        return $entity;
    }
840435
public function changeUserPassword(
        UserPasswordChangeData $data = null,
        ?string $name = null,
        ?User $user = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(UserPasswordChangeType::class);

        return $this->formFactory->createNamed($name, UserPasswordChangeType::class, $data, [
            'user' => $user,
        ]);
    }
1214194
public function insertSuperUser(array $userData){

		if (empty($userData['login']) || empty($userData['password'])){
			throw new tao_install_utils_Exception("To create a super user you must provide at least a login and a password");
		}

		$superUserOntology = dirname(__FILE__) . "/../ontology/superuser.rdf";

		if (!@is_readable($superUserOntology)){
			throw new tao_install_utils_Exception("Unable to load ontology : ${superUserOntology}");
		}

		$doc = new DOMDocument();
		$doc->load($superUserOntology);

		foreach ($userData as $key => $value){
			$tags = $doc->getElementsByTagNameNS('http://www.tao.lu/Ontologies/generis.rdf#', $key);
			foreach ($tags as $tag){
				$tag->appendChild($doc->createCDATASection($value));
			}
		}
		return $this->insertLocalModel($doc->saveXML());
	}
329763
protected function createSignup(array $data, $userId)
    {
        return Signup::create([
            'user_id' => $userId,
            'firstname' => $data['firstname'],
            'surname' => $data['surname'],
            'gender' => $data['gender'],
            'email' => $data['email'],
            'mobile_number' => $data['mobile_number'],
        ]);
    }
712903
protected function createUser(array $data, UserProviderInterface $userManager)
    {
        $userIdentityfield = $this->container->getParameter('rch_jwt_user.user_identity_field');

        $user = $userManager->createUser()
            ->setUsername($data[$userIdentityfield])
            ->setEmail($data[$userIdentityfield])
            ->setEnabled(true)
            ->setPlainPassword($data['password']);

        if (isset($data['facebook_id'])) {
            $user->setFacebookId($data['facebook_id']);
        }

        try {
            $userManager->updateUser($user);
        } catch (\Exception $e) {
            $message = $e->getMessage() ?: 'An error occured while creating the user.';

            throw new UserException(422, $message, $e);
        }

        return $user;
    }
782412
public function login( UserData $user ) {
		// clear session
		foreach ( $_SESSION as $key => $value ) {
			unset( $_SESSION[$key] );
		}

		// generate new session id
		session_regenerate_id( true );

		// store user info in session
		$this->setUser( $user );
	}