# WHMCS\Authentication\CurrentUser

`Class`

Utility class for assessing the authentication state or identity of the
current actor

## Methods

### isAuthenticatedUser

```php
public function isAuthenticatedUser(): bool
```

Whether the current actor is authenticated as a User

**Returns** `User\|null`

### isAuthenticatedAdmin

```php
public function isAuthenticatedAdmin(): bool
```

Whether the current actor is authenticated as an Admin

**Returns** `Admin\|null`

### isMasqueradingAdmin

```php
public function isMasqueradingAdmin(): bool
```

Whether the current actor is authenticated as an Admin but is also
acting on behalf of the client, having performed a "Login as Owner".

**Returns** `bool`

### user

```php
public function user(): ?User
```

Get the currently authenticated user.

**Returns** `User\|null`

### admin

```php
public function admin(): ?Admin
```

Get the currently authenticated admin.

**Returns** `Admin\|null`

### client

```php
public function client(): ?Client
```

Get the currently active client for management.

**Returns** `Client\|null`