src/Module/Authentication/LocalAuth/LocalAuth.php
public function login($id, $userData)
    {
        $this->abortIfExpired($id, $userData);

        $u = new User();
        $u->setAuthenticated(true);
        $u->setAuthenticator($this->getName());
        $u->setId($id);

        if (isset($userData['groups'])) {
            $u->setGroups($userData['groups']);
        }
        if (isset($userData['displayName'])) {
            $u->setDisplayName($userData['displayName']);
        }
        if (isset($userData['attributes'])) {
            foreach ($userData['attributes'] as $key => $value) {
                $u->setAttribute($key, $value);
            }
        }
        $this->picoAuth->setUser($u);
    }
public function login($id, $userData)
    {
        $this->abortIfExpired($id, $userData);

        $u = new User();
        $u->setAuthenticated(true);
        $u->setAuthenticator($this->getName());
        $u->setId($id);

        if (isset($userData['groups'])) {
            $u->setGroups($userData['groups']);
        }
        if (isset($userData['displayName'])) {
            $u->setDisplayName($userData['displayName']);
        }
        if (isset($userData['attributes'])) {
            foreach ($userData['attributes'] as $key => $value) {
                $u->setAttribute($key, $value);
            }
        }
        $this->picoAuth->setUser($u);
    }
Logs the user in

@param string $id User identifier
@param array $userData User data array