---
title: "gss_userok(_:_:)"
framework: GSS
role: symbol
role_heading: Function
platforms: [iOS 7.0+, iPadOS 7.0+, Mac Catalyst 13.1+, macOS 10.9+, visionOS 1.0+]
path: "gss/gss_userok(_:_:)"
---

# gss_userok(_:_:)

Returns a flag that indicates if a given user is authorized.

## Declaration

```swift
func gss_userok(_ name: gss_name_t, _ user: UnsafePointer<CChar>) -> Int32
```

## Parameters

- `name`: A name object.
- `user`: A C string that is first imported as a name object with name type doc://com.apple.gss/documentation/GSS/GSS_C_NT_USER_NAME and then authorized against the name object given by the first parameter.

## Return Value

Return Value A non-zero integer when the user is authorized and zero otherwise.

## See Also

### Inquiries

- [gss_display_name(_:_:_:_:)](gss/gss_display_name(_:_:_:_:).md)
- [gss_compare_name(_:_:_:_:)](gss/gss_compare_name(_:_:_:_:).md)
- [gss_inquire_name(_:_:_:_:_:)](gss/gss_inquire_name(_:_:_:_:_:).md)
- [gss_inquire_mechs_for_name(_:_:_:)](gss/gss_inquire_mechs_for_name(_:_:_:).md)
- [gss_inquire_names_for_mech(_:_:_:)](gss/gss_inquire_names_for_mech(_:_:_:).md)
- [gss_duplicate_name(_:_:_:)](gss/gss_duplicate_name(_:_:_:).md)
- [gss_aapl_change_password(_:_:_:_:)](gss/gss_aapl_change_password(_:_:_:_:).md)
