Perforce Command Reference:   [Index] [Prev] [Next]


p4 user

Synopsis

Create or edit Perforce user specifications and preferences.

Syntax

p4 [g-opts] user [-f] [username]
p4 [g-opts] user -o [username]
p4 [g-opts] user -i [-f]
p4 [g-opts] user -d [-f]

Description

By default, any system user becomes a valid Perforce user the first time he uses any Perforce command. When Perforce is first used, a Perforce user specification with default settings is created for the invoking user. The p4 user command can be used to edit these settings, or to create the user record if the user has not used Perforce before.

Perforce superusers can prevent random users from accessing Perforce with p4 protect.

When p4 user is called, a form is brought up in the editor defined by the P4EDITOR environment or registry variable. Perforce expects the form's entries to be entered in Perforce's standard forms format.

When called without a username, p4 user will edit the specification of the current user. When called with a username, the user specification will be displayed, but can't be changed. Superusers can edit other users' specifications with the -f (force) flag: p4 user -f username.

The user who gives the Perforce command is not necessarily the user under which the command runs. The user for any particular command is determined by the following:

Form Fields

Field Name Type Description
User: Read-only The Perforce username under which p4 user was invoked. By default, this is the user's system username.
Email: Writable The user's email address. By default, this is user@client.
Update: Read-only The date and time this specification was last updated.
Access: Read-only The date and time this user last ran a Perforce command.
FullName: Writable The user's full name.
JobView: Writable A description of the jobs to appear automatically on all new changelists (described in the Usage Notes, below).
Password: Writable The user's password (described in the Usage Notes, below).
Reviews: Writable List A list of files that the user would like to review (described in the Usage Notes, below).

Options

-d username Deletes the specified user. Only user username, or the Perforce superuser, can run this command.
-f Superuser force flag; allows the superuser to modify or delete the specified user.
-i Read the user specification from standard input. The input must conform to the forms format.
-o Write the user specification to standard output.
g_opts See global options section.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
N/A N/A list

No matter what the length of the password is, it will be displayed as six asterisks whenever you subsequently call p4 user.
Each of these three methods overrides the methods above it. For more information on passwords, please see p4 passwd.
//depot/foo/...
//depot/.../README
then the change review daemon will send joe email whenever any README file has been submitted, and whenever any file under //depot/foo has been submitted.
For example, suppose the jobs at your site have a field called Owned-By. Set the p4 user's Jobview: to Owned-By=yourname&status=open; all open jobs owned by you will appear on all changelists you create. Please see p4 jobs for a full description of jobview usage and syntax.

Examples

p4 user joe View the user specification of Perforce user joe.
p4 user Edit the user specification for the current Perforce user.
p4 user -d sammy Delete the user specification for the Perforce user sammy.
p4 -u joe -P hey submit Run p4 submit as user joe, whose password is hey.

Related Commands

To view a list of all Perforce users p4 users
To change a user's password p4 passwd
To view a list of users who have subscribed to review particular files p4 reviews



Perforce Command Reference:   [Index] [Prev] [Next]


Copyright 1999 Perforce Software.
Contact us at [email protected]
Last updated: 09/15/99 (Manual version 99.1.cr.6)