Returns the user identity ID.
@return int|string|null user identity ID, `null` if not available.
15864
public function getUserId()
    {
        if (
            \Yii::$app !== null
            && \Yii::$app->has('user', true)
            && \Yii::$app->getUser() !== null
        ) {
            $user = \Yii::$app->getUser()->getIdentity(false);
            if ($user !== null) {
                return $user->getId();
            }
        }
        return null;
    }
756746
public function id()
    {
        if ($this->loggedOut) {
            return;
        }

        return $this->user()
                    ? $this->user()->getAuthIdentifier()
                    : $this->session->get($this->getName());
    }
1174518
protected function getUserId()
    {
        $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if ($user->loadAdminUser()) {
            return $user->getId();
        }
    }
1131939
public function getId()
    {
        return (strpos($this->__id, "[]") !== false) ? str_replace("[]", "", $this->__id) : $this->__id;
    }
1276842
protected function getUserId($iUserId = null)
    {
        if (!empty($iUserId)) {
            $iUid = (int) $iUserId;
        } elseif ($this->activeUser('id')) {
            $iUid = $this->activeUser('id');
        } else {
            $this->setError('No user ID set');
            return false;
        }

        return $iUid;
    }
491911
protected function sessionUserId() {
		$userId = null;
		$request = $this->newRequest();

		if ($request->session()->started()) {
			$userId = $request->session()->read($this->_config['sessionUserIdKey']);
		} else {
			$this->log('The Session is not started. This typically means a User is not logged in. In this case there is no Session value for the currently active User and therefore we will set the `creator_id` and `modifier_id` to a null value. As a fallback, we are manually starting the session and reading the `$this->_config[sessionUserIdKey]` value, which is probably not correct.', 'debug');
			try {
				$request->session()->start();
				$userId = $request->session()->read($this->_config['sessionUserIdKey']);
			} catch (RuntimeException $e) {
			}
		}

		return $userId;
	}
1245283
public function getUserId() {
    if (array_key_exists(self::USER_ATTR, $this->payload)) {
      return $this->payload[self::USER_ATTR];
    }
    throw new AuthException("No user_id in token");
  }
713635
protected function getUsername()
    {

        // initialize the name
        $name = null;

        // query whether or not we've an principal
        if ($identity = $this->getIdentity()) {
            $name = $identity->getName();
        }

        // return the name
        return $name;
    }
422200
public function getUserId()
    {
        $id = $this->getAttribute('userId');
        if (null === $id && null !== $this->user) {
            $id = $this->userId = $this->user->id;
        }

        return $id;
    }
531838
public function getUserId()
    {
        /* @var $session \Mage_Customer_Model_Session */
        $session = Mage::getSingleton('customer/session');
        $customer = $session->getCustomer();
        if ($customer !== null) {
            return $session->getCustomer()->getId();
        } else {
            return null;
        }
    }
1200625
public function id()
	{
		if ($this->loggedOut)
		{
			return null;
		}

		if (!$this->user())
		{
			return null;
		}

		return $this->user()->ID;
	}
706446
public function getId()
    {
        if (is_null($this->_id)) {
            $this->_id = md5(microtime() . mt_rand());
        }

        return $this->_id;
    }
760767
public function clientId()
	{
		if (isset($this->client_id)) {
			return $this->client_id ? $this->client_id : null;
		}
		
		if (!$this->check()) {
			return null;
		}
		
		if (Request::input('client_id')) {
			$this->client_id = Request::input('client_id');
		}
		else if ($id = Authorizer::getClientId()) {
			$this->client_id = $id;
		}
		else {
			$this->client_id = false;
		}
		
		return $this->client_id ? $this->client_id : null;
	}
830278
public function getID(): ?string
    {
        $sessionKey = $this->getSessionKey();
        if (strlen($sessionKey) === 0) {
            return null;
        }
        $cacheKey = 'id-' . $sessionKey;
        if (!isset(self::$cache[$cacheKey])) {
            self::$cache[$cacheKey] = null;
            $data = Internal\Data::getValue('.temp/bearcms/userkeys/' . md5($sessionKey));
            if ($data !== null) {
                self::$cache[$cacheKey] = $data;
            }
        }
        return self::$cache[$cacheKey];
    }
553041
public function getId()
    {
        if ($this->_id !== null) {
            return $this->_id;
        } else {
            return $this->_id = sprintf('%x', crc32($this->getBasePath() . $this->name));
        }
    }
339147
private function getAuthenticatedUser()
    {
        $auth = $this->getServiceLocator()
                     ->get( 'Zend\Authentication\AuthenticationService' );

        if ( $auth->hasIdentity() )
        {
            return $auth->getIdentity();
        }

        return null;
    }
839583
public function getUser()
    {
        if ($this->_user === false) {
            $identity = Cii::$app->user->getIdentityGroupClass($this->group);
            $this->_user = $identity::findByUsername($this->username);
        }
        return $this->_user;
    }