# GPGUserID

> Inherits From:
>   GPGObject : NSObject

> Conforms To:
>   NSCopying

> Declared In:
>   GPGME/GPGUserID.h

## Class Description

A user ID is a component of a GPGKey object. One key can have many user IDs. The first one in the list is the main (or primary) user ID. It is guaranteed that the owning GPGKey instance will never be deallocated before the GPGUserID has been deallocated, without creating non-breakable retain-cycles.

A user ID represents an identity associated with a key. This identity is generally composed of a name and an email adress, and can have a comment associated.

The signatures on a key (in fact a user ID) are only available if the key was retrieved via a listing operation with the GPGKeyListModeSignatures mode enabled, because it is expensive to retrieve all signatures of a key.

## Symbolic Constants

> #### Synopsis:

> `GPGUSERID_H`

## Instance Variables

> `GPGKey *_key;`
> `NSArray *_signatures;`
> `int _refCount;`

> _key | Key owning the user ID; not retained
> _signatures | Signatures on the user ID
> _refCount | No description.

## Method Types

>   - description
>   - userID
>   - key
> Attributes
>   - name
>   - comment
>   - email
>   - validity
>   - hasBeenRevoked
>   - isInvalid
> Convenience methods
>   - validityDescription
> Signatures
>   - signatures

## Instance Methods

### comment

`- (NSString *)comment`

Returns the user ID comment, if available.

### description

`- (NSString *)description`

Returns the user ID as "Name (Comment) <Email>".

### email

`- (NSString *)email`

Returns the user ID email address, if available.

### hasBeenRevoked

`- (BOOL)hasBeenRevoked`

Returns whether the user ID has been revoked or not.

### isInvalid

`- (BOOL)isInvalid`

Returns whether the user ID is invalid or not.

### key

`- (GPGKey *)key`

Returns the key owning that userID.

### name

`- (NSString *)name`

Returns the user ID name, if available.

### signatures

`- (NSArray *)signatures`

Returns the signatures on the user ID, if they have been fetched. Array contains GPGKeySignature instances.

Returns nil if signatures have not been fetched.

### userID

`- (NSString *)userID`

Returns the user ID as "Name (Comment) <Email>".

### validity

`- (GPGValidity)validity`

Returns the user ID validity.

Note that for secret keys, validity is currently meaningless and always set to GPGValidityUnknown. This will be fixed with gpg >= 1.9.

### validityDescription

`- (NSString *)validityDescription`

Returns a localized string describing the user ID validity.

Version 1.1 Copyright ©2005 by Mac GPG Project. All Rights Reserved. Sun Jan 23 16:54:42 2005