Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SystemDceSecurityProvider.php

function SystemDceSecurityProvider::getUid

@inheritDoc

Throws

DceSecurityException if unable to get a user identifier

Overrides DceSecurityProviderInterface::getUid

File

vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php, line 42

Class

SystemDceSecurityProvider
SystemDceSecurityProvider retrieves the user or group identifiers from the system

Namespace

Ramsey\Uuid\Provider\Dce

Code

public function getUid() : IntegerObject {
    
    /** @var int|float|string|IntegerObject|null $uid */
    static $uid = null;
    if ($uid instanceof IntegerObject) {
        return $uid;
    }
    if ($uid === null) {
        $uid = $this->getSystemUid();
    }
    if ($uid === '') {
        throw new DceSecurityException('Unable to get a user identifier using the system DCE ' . 'Security provider; please provide a custom identifier or ' . 'use a different provider');
    }
    $uid = new IntegerObject($uid);
    return $uid;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal