Bugzilla::User methods for obtaining user ID info

Frédéric Buclin lpsolit at gmail.com
Wed Nov 27 13:20:47 UTC 2013

Le 27. 11. 13 13:57, Gervase Markham a écrit :
> name():     returns the real name, the DB 'realname' value.

Used when you want only the real name to be displayed, e.g. commenters
in bug reports. It's mostly a UI thing.

> login():    returns the DB 'login_name' value.

Used to identify user accounts. login_name is enforced to be unique in
the DB and so 2 users cannot have the same login. This attribute is used
when you enter your login + password or when you use the autocompletion
feature. That's what other logged in users will see.

> email():    returns the value of login() plus the emailsuffix.

Used internally to send emails. If emailsuffix is empty, then it exactly
matches login(). Else it's appended to login_name to form the complete
email address. Users should never see nor access it, at least from the
web UI (one would have to check if User.get returns this attribute or not).

> identity(): returns the string "name() <login()>".

It's a UI thing only, used both in the web UI and in emails.

> nick():     returns the part of login before the @ sign.

For logged in users, used mostly for flag setters and requesters, to
keep it short. For logged out users, used everywhere in place of
login(), to not disclose the email address (as most of the time,
emailsuffix is empty).


More information about the developers mailing list