Bugzilla::Webservice::User - The User Account and Login API
This part of the Bugzilla API allows you to create User Accounts and log in/out using an existing account.
See Bugzilla::WebService for a description of what STABLE, UNSTABLE, and EXPERIMENTAL mean, and for more information about error codes.
login
EXPERIMENTALLogging in, with a username and password, is required for many Bugzilla installations, in order to search for bugs, post new bugs, etc. This method logs in an user.
login
(string) - The user's login name.password
(string) - The user's password.remember
(bool) Optional - if the cookies returned by the call to login should expire with the session or not.
In order for this option to have effect the Bugzilla server must be configured to allow the user to set this option - the Bugzilla parameter rememberlogin must be set to "defaulton" or "defaultoff".
Addionally,
the client application must implement management of cookies across sessions.On success,
a hash containing one item,
id
,
the numeric id of the user that was logged in.
A set of http cookies is also sent with the response.
These cookies must be sent along with any future requests to the webservice,
for the duration of the session.
The username does not exist, or the password is wrong.
The account has been disabled. A reason may be specified with the error.
A login or password parameter was not provided.
logout
EXPERIMENTALLog out the user. Does nothing if there is no user logged in.
offer_account_by_email
EXPERIMENTALSends an email to the user, offering to create an account. The user will have to click on a URL in the email, and choose their password and real name.
This is the recommended way to create a Bugzilla account.
email
(string) - the email to send the offer to.This Bugzilla does not allow you to create accounts with the format of email address you specified. Account creation may be entirely disabled.
An account with that email address already exists in Bugzilla.
create
EXPERIMENTALCreates a user account directly in Bugzilla, password and all. Instead of this, you should use "offer_account_by_email" when possible, because that makes sure that the email address specified can actually receive an email. This function does not check that.
email
(string) - The email address for the new user.full_name
(string) Optional - The user's full name.
Will be set to empty if not specified.password
(string) Optional - The password for the new user account,
in plain text.
It will be stripped of leading and trailing whitespace.
If blank or not specified,
the newly created account will exist in Bugzilla,
but will not be allowed to log in using DB authentication until a password is set either by the user (through resetting their password) or by the administrator.A hash containing one item,
id
,
the numeric id of the user that was created.
The same as "offer_account_by_email". If a password is specified, the function may also throw:
The password specified is too short. (Usually, this means the password is under three characters.)
The password specified is too long. (Usually, this means the password is over ten characters.)