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
)
Public Function Logout (
options As Options,
Optional user As String = Nothing
) As Boolean
public:
bool Logout(
Options^ options,
String^ user = nullptr
)
member Logout :
options : Options *
?user : string
(* Defaults:
let _user = defaultArg user null
*)
-> bool
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:
BooleanSuccess/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