# getUser | @account-kit/core

> Overview of the getUser function from @account-kit/core

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function getUser(config): null | (User & object);
```

Defined in: [account-kit/core/src/actions/getUser.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/actions/getUser.ts#L21)

Returns the currently logged in user if using an SCA with the AlchemySigner
or the connected EOA details.

## Example

```ts
import { getUser } from "@account-kit/core";
import { config } from "./config";

const user = getUser(config);
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `config`
      </td>

      <td>
        `AlchemyAccountsConfig`
      </td>

      <td>
        the account config containing app state
      </td>
    </tr>

  </tbody>
</table>

## Returns

`null` | [`User`](../../../signer/src/type-aliases/User) & `object`

the user if the signer or an EOA are connected