my $item = filter $filters, {
id => $self->type('int', $user->id),
real_name => $self->type('string', $user->name),
+ nick => $self->type('string', $user->nick),
name => $self->type('email', $user->login),
email => $self->type('email', $user->email),
}, $types, $prefix;
C<string> The 'real' name for this user, if any.
+=item C<nick>
+
+C<string> The user's nickname. Currently this is extracted from the real_name,
+name or email field.
+
=item C<name>
C<string> The user's Bugzilla login.
map {{
id => $self->type('int', $_->id),
real_name => $self->type('string', $_->name),
+ nick => $self->type('string', $_->nick),
name => $self->type('string', $_->login),
email => $self->type('string', $_->email),
can_login => $self->type('boolean', $_->is_enabled),
C<string> The actual name of the user.
+=item nick
+
+C<string> The user's nickname. Currently this is extracted from the real_name,
+name or email field.
+
=item email
C<string> The email address of the user.
{
id => $self->type(int => $_->{id}),
real_name => $self->type(string => $_->{real_name}),
+ nick => $self->type(string => $_->{nick}),
name => $self->type(email => $_->{name}),
}
} @$results;
@users = map { filter $params, {
id => $self->type('int', $_->id),
real_name => $self->type('string', $_->name),
+ nick => $self->type('string', $_->nick),
name => $self->type('email', $_->login),
} } @$in_group;
my $user_info = filter $params, {
id => $self->type('int', $user->id),
real_name => $self->type('string', $user->name),
+ nick => $self->type('string', $user->nick),
name => $self->type('email', $user->login),
email => $self->type('email', $user->email),
can_login => $self->type('boolean', $user->is_enabled ? 1 : 0),
{
id => $self->type( 'int', $user->id ),
real_name => $self->type( 'string', $user->name ),
+ nick => $self->type( 'string', $user->nick ),
name => $self->type( 'email', $user->login ),
mfa_status => $self->type( 'boolean', !!$user->mfa ),
}
C<string> The actual name of the user. May be blank.
+=item nick
+
+C<string> The user's nickname. Currently this is extracted from the real_name,
+name or email field.
+
=item email
C<string> The email address of the user.
=back
B<Note>: If you are not logged in to Bugzilla when you call this function, you
-will only be returned the C<id>, C<name>, and C<real_name> items. If you are
-logged in and not in editusers group, you will only be returned the C<id>, C<name>,
-C<real_name>, C<email>, and C<can_login> items. The groups returned are filtered
-based on your permission to bless each group.
+will only be returned the C<id>, C<name>, C<real_name> and C<nick> items. If you
+are logged in and not in editusers group, you will only be returned the C<id>,
+C<name>, C<real_name>, C<nick>, C<email> and C<can_login> items. The groups
+returned are filtered based on your permission to bless each group.
=back
=item Error 804 has been added in Bugzilla 4.0.9 and 4.2.4. It's now
illegal to pass a group name you don't belong to.
+=item C<nick> Added in Bugzilla B<6.0>.
+
=back
=item REST API call added in Bugzilla B<5.0>.
C<string> The actual name of the user. May be blank.
+=item nick
+
+C<string> The user's nickname. Currently this is extracted from the real_name,
+name or email field.
+
=item name
C<string> The login name of the user.
"assigned_to_detail": {
"id": 2,
"real_name": "Test User",
+ "nick": "user",
"name": "user@bugzilla.org",
"email": "user@bugzilla.org"
},
{
"id": 786,
"real_name": "Foo Bar",
+ "nick": "foo",
"name": "foo@bar.com",
"email": "foo@bar.com"
},
"creator_detail": {
"id": 28,
"real_name": "hello",
+ "nick": "namachi",
"name": "user@bugzilla.org",
"email": "namachi@netscape.com"
},
========= ====== ==============================================================
id int The user ID for this user.
real_name string The 'real' name for this user, if any.
+nick string The user's nickname. Currently this is extracted from the
+ real_name, name or email field.
name string The user's Bugzilla login.
email string The user's email address. Currently this is the same value as
the name.
"requestee": {
"id": 123,
"name": "user@mozilla.com",
+ "nick": "user",
"real_name": "J. Random User"
},
"setter": {
"id": 123,
"name": "user@mozilla.com",
+ "nick": "user",
"real_name": "J. Random User"
},
"status": "?",
id int The unique ID of the user.
name string The login of the user (typically an email address).
real_name string The real name of the user, if set.
+nick string The user's nickname. Currently this is extracted
+ the real_name, name or email field.
========= ====== ====================================================
The type object has the following fields:
"membership": [
{
"real_name": "Bugzilla User",
+ "nick": "user",
"can_login": true,
"name": "user@bugzilla.org",
"login_denied_text": "",
============= ======= =========================================================
id int The ID of the user.
real_name string The actual name of the user.
+nick string The user's nickname. Currently this is extracted from
+ the real_name, name or email field.
email string The email address of the user.
name string The login name of the user. Note that in some situations
this is different than their email.
this user. Even if the user's login name changes,
this will not change.
real_name string The actual name of the user. May be blank.
+nick string The user's nickname. Currently this is extracted from
+ the real_name, name or email field.
email string The email address of the user.
name string The login name of the user. Note that in some
situations this is different than their email.
===== ====== ==================================================================
If you are not authenticated when you call this function, you will only be
-returned the ``id``, ``name``, and ``real_name`` items. If you are authenticated
-and not in 'editusers' group, you will only be returned the ``id``, ``name``,
-``real_name``, ``email``, ``can_login``, and ``groups`` items. The groups
-returned are filtered based on your permission to bless each group. The
-``saved_searches`` and ``saved_reports`` items are only returned if you are
+returned the ``id``, ``name``, ``real_name`` and ``nick`` items. If you are
+authenticated and not in 'editusers' group, you will only be returned the ``id``,
+``name``, ``real_name``, ``nick``, ``email``, ``can_login`` and ``groups`` items.
+The groups returned are filtered based on your permission to bless each group.
+The ``saved_searches`` and ``saved_reports`` items are only returned if you are
querying your own account, even if you are in the editusers group.
**Errors**
"id" : "1234",
"name" : "user@bugzulla.org",
"real_name" : "Test User",
+ "nick" : "user"
}
========== ====== =====================================================
this user. Even if the user's login name changes,
this will not change.
real_name string The actual name of the user. May be blank.
+nick string The user's nickname. Currently this is extracted from
+ the real_name, name or email field.
name string string The login name of the user.
========== ====== =====================================================
id => $self->type('int', $reviewer->id),
email => $self->type('email', $reviewer->login),
name => $self->type('string', $reviewer->name),
+ nick => $self->type('string', $reviewer->nick),
review_count => $self->type('int', $reviewer->review_count),
};
}
return {
id => $self->type('int', $user->id),
real_name => $self->type('string', $user->name),
+ nick => $self->type('string', $user->nick),
name => $self->type('email', $user->login),
};
}
The real name of the bugzilla user.
+=item C<nick> (string)
+
+The user's nickname. Currently this is extracted from the real_name, name or
+email field.
+
=item C<name> (string)
The bugzilla login of the bugzilla user (typically an email address).
}
else {
my @item_keys = sort keys %$item;
- is_deeply(\@item_keys, ['id', 'name', 'real_name'],
- 'Only id, name, and real_name are returned to logged-out users');
+ is_deeply(\@item_keys, ['id', 'name', 'nick', 'real_name'],
+ 'Only id, name, nick and real_name are returned to logged-out users');
return;
}
my $exclude_none = $rpc->bz_call_success('User.get', {
names => [$get_user], exclude_fields => ['asdfasdfsdf'],
}, 'User.get excluding only invalid fields');
- is(scalar keys %{ $exclude_none->result->{users}->[0] }, 3,
+ is(scalar keys %{ $exclude_none->result->{users}->[0] }, 4,
'All fields returned for user');
my $exclude_one = $rpc->bz_call_success('User.get', {
names => [$get_user], exclude_fields => ['id'],
}, 'User.get excluding id');
- is(scalar keys %{ $exclude_one->result->{users}->[0] }, 2,
- 'Only two fields returned for user');
+ is(scalar keys %{ $exclude_one->result->{users}->[0] }, 3,
+ 'Only three fields returned for user');
my $override = $rpc->bz_call_success('User.get', {
names => [$get_user], include_fields => ['id', 'name'],