---
title: userName
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/processinfo/username
---

# userName

Returns the account name of the current user.

## Declaration

```swift
var userName: String { get }
```

## See Also

### Accessing user information

- [fullUserName](foundation/processinfo/fullusername.md)
