Click or drag to resize

User Class

A user on a Perforce Server, represented by a P4 User spec.
Inheritance Hierarchy
SystemObject
  Perforce.P4User

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public class User

The User type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAccessed
The date this user was last active. Read only.
Public propertyAuthMethod
Authentication method used for this user
Public propertyEmailAddress
The user's email address; for email review.
Public propertyFullName
The user's real name.
Public propertyId
The user's user name.
Public propertyJobView
Selects jobs for inclusion during changelist creation.
Public propertyPassword
If set, user must have matching $P4PASSWD on client.
Public propertyReviews
Listing of depot files to be reviewed by user.
Public propertySpec
The specification for the user form
Public propertyType
Either 'service', 'operator', or 'standard'. Default: 'standard'. Read only.
Public propertyUpdated
The date this specification was last modified.
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFromUserCmdTaggedOutput
Read the fields from the tagged output of a user command
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodParse
Parse the fields from a user specification
Public methodToString
Convert to specification in server format
(Overrides ObjectToString.)
Top
Remarks

p4 help user

user -- Create or edit a user specification

p4 user [-f] [name]
p4 user -d [-f] name
p4 user -o [name]
p4 user -i [-f]

Create a new user specification or edit an existing user specification.
The specification form is put into a temporary file and the editor
(configured by the environment variable $P4EDITOR) is invoked.

Normally, a user specification is created automatically the first
time that the user issues any command that updates the depot. The
'p4 user' command is typically used to edit the user's subscription
list for change review.

The user specification form contains the following fields:

User: The user name (read-only).

Email: The user's email address (Default: user@client).

Update: The date the specification was last modified (read-only).

Access: The date that the user last issued a client command.

FullName: The user's real name.

JobView: Selects jobs that are displayed when the user creates
a changelist. These jobs can be closed automatically
when the user submits the changelist. For a description
of jobview syntax, see 'p4 help jobview'

Reviews: The subscription list for change review. There is no
limit on the number of lines that this field can contain.
You can include the following wildcards:

... matches any characters including /
* matches any character except /

Password: The user's password. See 'p4 help passwd'.

Type: Must be 'service', operator, or 'standard'. Default is
'standard'. Once set, the user type cannot be changed.

AuthMethod: Must be 'perforce' or 'ldap'. Default is 'perforce'
Unless overridden by the 'auth.default.method'
configurable, see 'p4 help configurables'. AuthMethod
can only be changed when the -f flag has been provided.

The -d flag deletes the specified user (unless the user has files
open).

The -o flag writes the user specification to the standard output.
The user's editor is not invoked.

The -i flag reads a user specification from the standard input.
The user's editor is not invoked.

The -f flag forces the creation, update or deletion of the specified
user, and enables you to change the Last Modified date. By default,
users can only delete or modify their own user specifications. The
-f flag requires 'super' access, which is granted by 'p4 protect'.

See Also