Click or drag to resize

ConnectionLogout Method

Logout of the Perforce server

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2024.1.261.8274
Syntax
public bool Logout(
	Options options,
	string user = null
)

Parameters

options
Type: Perforce.P4Options
Logout options (see remarks in help file)
user (Optional)
Type: SystemString
user name to log out, (requires Super access)

Return Value

Type: Boolean
Success/Failure
Remarks

p4 help logout

logout -- Log out from Perforce by removing or invalidating a ticket.

p4 logout [-a] [user]

The logout command removes the ticket on the client. To resume using
Perforce, the user must log in again.

If you are logged in to Perforce from more than one machine, you can
log out of Perforce from all machines from which you were logged in
by specifying the -a flag. The -a flag invalidates the ticket on the
server. All of your Perforce tickets are invalidated and you are
logged out.

Specifying a username as an argument to 'p4 logout' requires 'super'
access, which is granted by 'p4 protect'. Note that the '-a' flag
must be used to effectively log out a user who has a valid ticket on
another machine.

See Also