You are here

public function AccountProxy::id in Restrict Login or Role Access by IP Address 8.4

Returns the user ID or 0 for anonymous.

Return value

int The user ID.

Overrides AccountInterface::id

1 call to AccountProxy::id()
AccountProxy::hasPermission in src/Session/AccountProxy.php
Checks whether a user has a certain permission.

File

src/Session/AccountProxy.php, line 83
Contains \Drupal\restrict_by_ip\Session\AccountProxy.

Class

AccountProxy
When the current user is loaded, remove any roles that are restricted based on IP whitelists. Proxy all other method calls to the original current_user service.

Namespace

Drupal\restrict_by_ip\Session

Code

public function id() {
  return $this->original
    ->id();
}